is it possible to get a Parents name from a Button/Panel

hdtvirl

Active Member
Licensed User
Longtime User
Hello everyone,

Is it possible to get a Parents name from a Button/Panel ?

I want to have two panels with the same number of buttons on them and have one event to handle all the buttons, but based on which panel they come from change parameters to do a database search, also is there anything like LINQ available in V4A or in the PIPELINE ?.

Regards

BOB
 

kickaha

Well-Known Member
Licensed User
Longtime User
I do not think it is possible to directly reference the parent panel.

Why not use each buttons Tag property to store a reference to its parent panel, and use Sender in the click event.

It may even be possible for you to store the query for each button in the Tag.
 
Upvote 0

hdtvirl

Active Member
Licensed User
Longtime User
Thanks for your response,

Does the button_click pass thru. to the Panel, in other words does pressing the button fire a panel event also ?. If so what event does it fire, I have tried that and it does not seem to work !

BOB
 
Upvote 0

hdtvirl

Active Member
Licensed User
Longtime User
Thanks Erfel,

That is what I discovered yesterday. I have figured out how I am going to do it using TAGS but it is not as elegent as getting the parent name from the panel.

I am going to use code to create the panels now, so my solution is not such an effort to implement. I originally create the views using the Designer and that is where my original question sprang from.


Thanks
BOB
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…