I would like to place a Grid inside a treeview ,treeview nodes are dynamic..
Click on a particular node , I have to show a grid/list to display values (like a matrix)..
Code that I am trying is below:-
Somehow the datatable is not binding to the grid & generating the script error
//creates a Node "Interventions"
RadTreeNode nodeInterventions = new RadTreeNode();
nodeInterventions.Text =
NodeConstants.InterventionNode;
//nodeInterventions.ContextMenuID = "MainContextMenu";
e.Node.Nodes.Add(nodeInterventions);
DataTable dtintervention=new DataTable();
dtintervention.Columns.Add(
"INTERVENTION");
dtintervention.Columns.Add(
"DISCIPLINE");
dtintervention.Columns.Add(
"FREQUENCY");
dtintervention.Columns.Add(
"DURATION_IN_WEEK");
foreach (DataRow row in data.Rows)
{
dtintervention.Rows.Add(row[
"INTERVENTION"].ToString(), row["DISCIPLINE"].ToString(), row["FREQUENCY"].ToString(), row["DURATION_IN_WEEK"].ToString());
}
//adding a dynamic grid to treeview
RadGrid rgrv_Interventions = new RadGrid();
rgrv_Interventions.DataSource = dtintervention;
rgrv_Interventions.DataBind();
//addign the control to the treenode
RadTreeNode nodeint = new RadTreeNode();
nodeint.Controls.Add(rgrv_Interventions);
nodeInterventions.Nodes.Add(nodeint);
}
Hi...
I am able to place a normal grid view..but why not a radgrid..
regards
Delia Joe