For the
ASPxTreeList, there are totally other kind of coding, because it's a
control of the DevExpress. All
Properties & events are totally different.
For your problem there is
one event CustomCallback, which will help you...
In the ASPxTreelist, there is
no kind of property called Enable or Visible for Node, so
we have to delete or remove that particular node...This is the only one way...
See below code, Which will remove Nodes from the ASPxTreelist...
protected void ASPxTreeList1_CustomCallback(object sender, DevExpress.Web.ASPxTreeList.TreeListCustomCallbackEventArgs e)
{
foreach (DevExpress.Web.ASPxTreeList.TreeListNode node in ASPxTreeList1.Nodes)
{
if (node.GetValue("1") == "1" || node.GetValue("2") == "2")
{
ASPxTreeList1.DeleteNode(node.Key);
}
}
ASPxTreeList1.DataBind();
}
In the above code i have passed the "1" & "2" as fieldNames of the ASPxTreelist, so you have to use your fieldnames instead of this...
Hope this will helpful to you...