Sir,
I have a split container in which in right panel i have a usercontrol.In the user control i have few buttons like view,new,edit etc.Bottom of that user control a form will open based on what link is clicked on the left side navigation pane. now when i click the user control’s view button, i should open a new form below it. how to get the context of splitcontainer in the click event?also if i want to retrieve the form values to save in database when i click the save button in user control, how to do it?
Sir, I have a split container in which in right panel i have a
Share
To get your button in the click event:
To get the parent of your button (if it was SplitContainer, you’ll have to use Parent property 3 times, because the first one will get you your UserControl, second – left panel of the SplitPanel, which doesn’t have a Name property, third – your SplitPanel, and 4th, if you want, your form name)
…or you can just get whole SplitPanel object:
…or Form object:
To do this, you have to be sure of the composition of your Form, so you can get the right controls at the right place.