asp.net - Set Web User Control Property to GridView Selected Row -
I have a web user control (SSCX) that exposes the "id" property What I want to do is this property Is set when a gridview is set on fire in a page with an index that is selected. However, I can not do this .... Here is my code:
Protected Zero GridFiciansCertified Index (Object Sender, EventAgds E) {physicians_certif1.mdid = grdPhysicians.SelectedDataKey.ToString (); MvData.SetActiveView (viewEdit); PanAdditional.Visible = true; }
Physicians_certif1 is user control. It seems that before the User Control is loading it has the chance to set its property in the selected Index Charged Event.
Any ideas people?
ASP.Net page can be difficult to understand with lifestyle, particularly with ASK user controls. , Who also has their own life cycle, if you are setting up MDID property in page_load of page or ASCX control or have hardened a default value in XHTML, then it may be possible that after the selected inc exchange fire Resetting.
Set a breakpoint in grdPhysiciansCustomize the index, set a clock at physicians_certif1.mdid and move through the code using the debugger.
Comments
Post a Comment