Click event of a Text element (passing bounded data)

Stimulsoft Reports.NET discussion
Post Reply
Paolo
Posts: 12
Joined: Fri Jul 27, 2007 4:11 am

Click event of a Text element (passing bounded data)

Post by Paolo »

Hello!

Is it possible to catch a click event of a text element of a report hosted in a StiPreviewControl?

I've got a report viewed inside a Windows Forms, I would like to catch the text click event in order to make a sort of "drill down" but inside a Windows Form.

Thank you,
Paolo.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Click event of a Text element (passing bounded data)

Post by Edward »

Yes, it is possible.

When click event occurs in StiText component then OnClick event is fired. So you can process the actions you need in that event handler.

Thank you.
Paolo
Posts: 12
Joined: Fri Jul 27, 2007 4:11 am

Click event of a Text element (passing bounded data)

Post by Paolo »

Thank you for the reponse.

But I'm able of catching the event INSIDE the report class, but not able of hanlding the event outside (in my Form)

somthing like:

public void Text1_Click(object sender, System.EventArgs e)
{
string arg = (sender as StiText).Text ecc...
}


I would like to catch the onclick in the windows forms code and obtain the argument.

Thanks...

Paolo.
Paolo
Posts: 12
Joined: Fri Jul 27, 2007 4:11 am

Click event of a Text element (passing bounded data)

Post by Paolo »

Oh, so sorry... it was so simple!!!

I was looking for a solution inside the report's code, but it was enough registering to the click event and then

private void stiReport1_Click(object sender, EventArgs e)
{
object o= (sender as StiText).Tag;
}

thank you very much, great job!

Paolo
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Click event of a Text element (passing bounded data)

Post by Edward »

Let us know if you need any help.

Thank you.
Post Reply