Hi
I have a Hierarchical grid.
Master
-detail1
--detail12
-detail2
-detail3
-detail4
--detail41
How I can bind a CheckBoxList to the fist level of the detail tables (detail1, detail2, detail3, detail4) and then show/hide the detail tables via Postback depending on the selected Items of the CheckBoxList.
I need something simular that I have done for the Columns in MasterTable (please see code below), but unfortunatly I can not make that for the details tables.
Thank you for your product and support.
protected void RadGridStudent_PreRender(object sender, EventArgs e)
{
CheckBoxListColumns1.Items.Clear();
for (int i = 3; i < RadGridStudent.MasterTableView.Columns.Count; i++)
{
ListItem myItem = new ListItem();
if (!String.IsNullOrEmpty(RadGridStudent.MasterTableView.Columns[i].HeaderText))
{
myItem.Selected = RadGridStudent.MasterTableView.Columns[i].Display;
myItem.Text = RadGridStudent.MasterTableView.Columns[i].HeaderText;
myItem.Value = i.ToString();
CheckBoxListColumns1.Items.Add(myItem);
}
}
}
Search words: GridNestedViewItem , DetailTables, Visible