Hello,
I need an argent help with the following requirement:
on each Treeview node click I need to load Grid
with different columns, headers and data .
I create a grid on Click event of the TreeView,
but the generated Grid disappears on PostBack
protected void CreateGrid()
{
RadGrid DataGrid = new RadGrid();
DataGrid.ID = "DataGrid";
DataGrid.ViewStateMode = System.Web.UI.ViewStateMode.Enabled;
DataGrid.enablea
DataGrid.AutoGenerateColumns
= true;
DataGrid.MasterTableView.AutoGenerateColumns = false;
DataGrid.MasterTableView.ShowHeadersWhenNoRecords = true;
GetGridHeader(table_name, DataGrid);
DataGrid.DataSource = GetData(table_name);
DataGrid.DataBind();
PlaceHolder1.Controls.Add(DataGrid);
}
Please advise what is the best way to do it, and
what is the problem with my approach.
Thank you,
Vadim
I need an argent help with the following requirement:
on each Treeview node click I need to load Grid
with different columns, headers and data .
I create a grid on Click event of the TreeView,
but the generated Grid disappears on PostBack
protected void CreateGrid()
{
RadGrid DataGrid = new RadGrid();
DataGrid.ID = "DataGrid";
DataGrid.ViewStateMode = System.Web.UI.ViewStateMode.Enabled;
DataGrid.enablea
DataGrid.AutoGenerateColumns
= true;
DataGrid.MasterTableView.AutoGenerateColumns = false;
DataGrid.MasterTableView.ShowHeadersWhenNoRecords = true;
GetGridHeader(table_name, DataGrid);
DataGrid.DataSource = GetData(table_name);
DataGrid.DataBind();
PlaceHolder1.Controls.Add(DataGrid);
}
Please advise what is the best way to do it, and
what is the problem with my approach.
Thank you,
Vadim