Hi,
I have written the code for Hierarchical Grid as per the reply of support ticket id : 660933.Its working fine.
I need to recreate the structure for Hierarchical Grid every-time on button click.(because columns & rows & Childtables of grid will get changed on button click with respect to some settings as per our requirement).
If I refer 2013.2.717.35 telerik trial version dll in my code,
Scenario:
On InitLoad, the grid shows expand icon for child rows.When I click button, the expand icon disappears in the grid for child rows,once I have changed the pagesize of grid,the grid shows expand icon for child rows.
But if I refer 2012.3.1308.35 telerik trial version dll in the code,the above scenario works fine.
How to overcome the issue expand icon disappears in the grid for child rows on button click with 2013.2.717.35 telerik dll reference? Please provide me the solution as soon as possible. Thanks in advance.
Sample Code Snippet:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
rdGrdCollapsibleGrid.Columns.Clear();
rdGrdCollapsibleGrid.MasterTableView.DetailTables.Clear();
DataSet ds = getMockDataForCG();
CreateHierarchicalGridStructure(rdGrdCollapsibleGrid, ds);
rdGrdCollapsibleGrid.DataBind();
}
}
protected void rdGrdCollapsibleGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
if (!e.IsFromDetailTable)
{
DataSet ds = getMockDataForCG();
if (ds.Tables[ds.Tables.Count - 2] != null && ds.Tables[ds.Tables.Count - 2].Rows.Count > 0)
rdGrdCollapsibleGrid.VirtualItemCount = Convert.ToInt32(ds.Tables[ds.Tables.Count - 2].Rows[0][ds.Tables[ds.Tables.Count - 2].Columns.Count - 1]);
rdGrdCollapsibleGrid.DataSource = ds.Tables[0];
}
}
protected void rdGrdCollapsibleGrid_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e)
{
//Here code for binding data onto respective detail table of grid
}
protected void btnRecreate_Click(object sender, EventArgs e)
{
rdGrdCollapsibleGrid.Columns.Clear();
rdGrdCollapsibleGrid.MasterTableView.DetailTables.Clear();
DataSet ds = getMockDataForCG();
CreateHierarchicalGridStructure(rdGrdCollapsibleGrid, ds);
rdGrdCollapsibleGrid.Rebind();
}
I have written the code for Hierarchical Grid as per the reply of support ticket id : 660933.Its working fine.
I need to recreate the structure for Hierarchical Grid every-time on button click.(because columns & rows & Childtables of grid will get changed on button click with respect to some settings as per our requirement).
If I refer 2013.2.717.35 telerik trial version dll in my code,
Scenario:
On InitLoad, the grid shows expand icon for child rows.When I click button, the expand icon disappears in the grid for child rows,once I have changed the pagesize of grid,the grid shows expand icon for child rows.
But if I refer 2012.3.1308.35 telerik trial version dll in the code,the above scenario works fine.
How to overcome the issue expand icon disappears in the grid for child rows on button click with 2013.2.717.35 telerik dll reference? Please provide me the solution as soon as possible. Thanks in advance.
Sample Code Snippet:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
rdGrdCollapsibleGrid.Columns.Clear();
rdGrdCollapsibleGrid.MasterTableView.DetailTables.Clear();
DataSet ds = getMockDataForCG();
CreateHierarchicalGridStructure(rdGrdCollapsibleGrid, ds);
rdGrdCollapsibleGrid.DataBind();
}
}
protected void rdGrdCollapsibleGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
if (!e.IsFromDetailTable)
{
DataSet ds = getMockDataForCG();
if (ds.Tables[ds.Tables.Count - 2] != null && ds.Tables[ds.Tables.Count - 2].Rows.Count > 0)
rdGrdCollapsibleGrid.VirtualItemCount = Convert.ToInt32(ds.Tables[ds.Tables.Count - 2].Rows[0][ds.Tables[ds.Tables.Count - 2].Columns.Count - 1]);
rdGrdCollapsibleGrid.DataSource = ds.Tables[0];
}
}
protected void rdGrdCollapsibleGrid_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e)
{
//Here code for binding data onto respective detail table of grid
}
protected void btnRecreate_Click(object sender, EventArgs e)
{
rdGrdCollapsibleGrid.Columns.Clear();
rdGrdCollapsibleGrid.MasterTableView.DetailTables.Clear();
DataSet ds = getMockDataForCG();
CreateHierarchicalGridStructure(rdGrdCollapsibleGrid, ds);
rdGrdCollapsibleGrid.Rebind();
}