Hi, Can I somehow add additional data to a treeview node AND access it through javascript? For example, what if I wanted to bind "category" data to be stored with each node below?
siteData.Add(new SiteDataItem(6, 2, "RadEditor", "editor"));
siteData.Add(new SiteDataItem(7, 3, "RadGrid", "grid"));
siteData.Add(new SiteDataItem(8, 3, "RadMenu", "menu"));
siteData.Add(new SiteDataItem(9, 3, "RadEditor", "editor"));
....
treeView.DataTextField = "Text";
treeView.DataFieldID = "ID";
treeView.DataValueField = "Value";
treeView.DataFieldParentID = "ParentID";
treeView.DataSource = siteData;
treeView.DataBind();
...Can I then pull the category value using javascript similar to how I access the value or text?
node.get_value()
"ajax"
node.get_text()
"RadControls for ASP.NET Ajax"
siteData.Add(new SiteDataItem(6, 2, "RadEditor", "editor"));
siteData.Add(new SiteDataItem(7, 3, "RadGrid", "grid"));
siteData.Add(new SiteDataItem(8, 3, "RadMenu", "menu"));
siteData.Add(new SiteDataItem(9, 3, "RadEditor", "editor"));
....
treeView.DataTextField = "Text";
treeView.DataFieldID = "ID";
treeView.DataValueField = "Value";
treeView.DataFieldParentID = "ParentID";
treeView.DataSource = siteData;
treeView.DataBind();
...Can I then pull the category value using javascript similar to how I access the value or text?
node.get_value()
"ajax"
node.get_text()
"RadControls for ASP.NET Ajax"