Mar 27, 2012, 11:57 AM
DirectEventArgs - Dynamic Grid Not Rendering to Placeholder... Help Please!?!?
I have a panel - with a placeholder - what I am trying to do - is to dynamically create a gridpanel - based upon selected rows of another - the data executes below fine and the store does load/bind - but nothing renders on the page??!??
protected void Button3_Click(object sender, DirectEventArgs e)
{
string connStr = System.Configuration.ConfigurationManager.ConnectionStrings["EDI"].ConnectionString;
RowSelectionModel sm = this.GridPanel3.SelectionModel.Primary as RowSelectionModel;
foreach (SelectedRow row in sm.SelectedRows)
{
string id = row.RecordID.ToString();
string clpID = e.ExtraParams["ClpID"].ToString();
Ext.Net.GridPanel gp = new Ext.Net.GridPanel {
ID = "GridPanel" + row.RowIndex.ToString(),
TrackMouseOver = true,
Title = ""
};
gp.Store.Add(storeDetails);
Ext.Net.Column clmn = new Ext.Net.Column { ColumnID = "ServiceDate", DataIndex = "ServiceDate", Header = "Service Date" };
gp.ColumnModel.Columns.Add(clmn);
DataTable dt = new DataTable();
SqlParameter[] aryParams = new SqlParameter[2];
aryParams[0] = new SqlParameter("@bprID", SqlDbType.Int);
aryParams[0].Value = Convert.ToInt32(582);
aryParams[1] = new SqlParameter("@clpID", SqlDbType.Int);
aryParams[1].Value = Convert.ToInt32(clpID);
dt.Load(SqlHelper.ExecuteReader(connStr, CommandType.StoredProcedure, "sp835_ClaimDetailsGET", aryParams));
storeDetails.DataSource = dt;
storeDetails.DataBind();
ph1.Controls.Add(gp);
ph1.Update();
Panel6.Render();
}
//this.ResourceManager1.AddScript("alert('" + clpID + "');");
}