asp.net - Access User Control DataGrid Controls from parent page -


here code-

gridview gvcondition = (gridview)this.findcontrol("uccondition").findcontrol("gvcondition"); gvcondition.datasource = objconditionfieldcollection; gvcondition.databind(); 

but throwing exception object reference not set instance of object.how can access user control's gridview control parent page?

i don't know trying access usercontrol's gridview, why don't expose public property in usercontrol returns gridview(f.e. conditionview)?


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -