How do I bind the Custom Field to the TreeView Node so that in javascript, I can get "Custom1" and "Custom2" value.
DataTable tb = new DataTable(); tb.Columns.Add("ID"); tb.Columns.Add("ParentID"); tb.Columns.Add("Name"); tb.Columns.Add("Custom1"); tb.Columns.Add("Custom2"); // add item to the datatable TreeView1.DataSource = tb; TreeView1.DataBind();
<telerik:RadTreeView ID="TreeView1" runat="server" Skin="Default" DataFieldID="ID" DataFieldParentID="ParentID" DataTextField="Name"> <DataBindings> <telerik:RadTreeNodeBinding Expanded="True" TextField="Name" ValueField="ID" /> </DataBindings> </telerik:RadTreeView>Thanks in advance.