J
Joe
//Parent ascx..
Control ChildControl = Page.LoadControl(Request.ApplicationPath + "/ChildControlSourceCode.ascx");
Page.WhatEverContainer.Controls.Add(ChildControl
//Now this in ChildControl Page_Load is fired..
DataGrid1.DataSource = ValidVerifiedDataTableWithRowsEverythingAOK
DataGrid1.DataBind()
//Back to Paren
DataGrid dg = (DataGrid)ChildControl.FindControl("DataGrid1")
object XportTable = dg.DataSource
***dg.DataSource is null. If the datagrid code is moved to the OnInit event in the child, then the parent can "see" the datasource and access it - WHY
Jo
Control ChildControl = Page.LoadControl(Request.ApplicationPath + "/ChildControlSourceCode.ascx");
Page.WhatEverContainer.Controls.Add(ChildControl
//Now this in ChildControl Page_Load is fired..
DataGrid1.DataSource = ValidVerifiedDataTableWithRowsEverythingAOK
DataGrid1.DataBind()
//Back to Paren
DataGrid dg = (DataGrid)ChildControl.FindControl("DataGrid1")
object XportTable = dg.DataSource
***dg.DataSource is null. If the datagrid code is moved to the OnInit event in the child, then the parent can "see" the datasource and access it - WHY
Jo