I'm trying to set checkboxes as checked on a radtreeview with tristatecheckboxes set to true. Using the code below works when there is only one level, but having trouble where there are 3 levels (passing in a comma delimted string of checkbox values).
protected void selectCheckedNodes(RadTreeView treeView, string val)
{
if (!string.IsNullOrEmpty(val))
{
string[] cbarray = new string[] { "" };
cbarray = val.Split(',');
foreach (string i in cbarray)
{
RadTreeNode obj = treeView.Nodes.FindNodeByValue(i);
if (obj != null)
obj.Checked = true;
}
}
}
Can someone show me how to iterate thru the treeview to check the approriate nodes? I am not passing in the parent categories, just the specific nodes I want checked. Thanks!
protected void selectCheckedNodes(RadTreeView treeView, string val)
{
if (!string.IsNullOrEmpty(val))
{
string[] cbarray = new string[] { "" };
cbarray = val.Split(',');
foreach (string i in cbarray)
{
RadTreeNode obj = treeView.Nodes.FindNodeByValue(i);
if (obj != null)
obj.Checked = true;
}
}
}
Can someone show me how to iterate thru the treeview to check the approriate nodes? I am not passing in the parent categories, just the specific nodes I want checked. Thanks!