Invoices uc = (Invoices)Page.LoadControl(userControlName);
uc.OrgId = CurOrgId;
uc.ID = e.PageView.ID +
"_userControl";
e.PageView.Controls.Clear();
//Not sure if this does anything but I added it anyway.
e.PageView.Controls.Add(uc);
uc.DataBind();
The RadGrid is bound using the following:
protected
void dgInvoice_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
string strSP = "GetInvoices";
System.Data.SqlClient.
SqlParameter[] spParams = new System.Data.SqlClient.SqlParameter[1];
spParams[0] =
new System.Data.SqlClient.SqlParameter("isActive", "1");
this.dgInvoice.DataSource = Database.getDataSet(strSP, spParams);
}
The control with the RadGrid functions perfectly when housed alone in an aspx page. But when we load the control dynamically into the RadMultiPage, the page displays fine...but clicking on anything that would fire a partial postback causes the entire RadGrid to disappear.
Any ideas?
Thanks in advance.
Vincent