Coimbatore, , India
C Sharp Dot Net, ADO Dot Net, ASP Dot Net
0 टिप्पणी करें | 54 लोगो ने देखा है | 13 जून 17  | Logeswari M J
In TreeList, Hide the particular node from the treelist based on some conditions. For Example: After binding the dataset to the Treelist it will contains Name fields. Based on Name to hide the Node in Treelist Control.

Step1: In TreeList Property contains Option Behaviour in that, To convert property Enable filtering turns to True.

Step2: To create a Method TreeList_FilterNode(object sender, DevExpress.XtraTreeList.FilerNodeEventArgs e), In this method, To Give the condition for filtering the node. FilterNodeEvent is fired, each Node is created at the runtime. It can be used to hide a specific node and make a particular node visible again.


Using If statement, check the values colName is aa
  if (Convert.ToString(e.Node[colName]) == "aa")

Step3: If the condition is true, Make the Node Visible turns to false. So it is not displayed at the runtime.

Step4:Additionly set the Handled Property to True. so no default process occurs in this event.


Code(C#)
---------------------------------------------------------------------------------------------------------------
   private void treeList1_FilterNode(object sender, DevExpress.XtraTreeList.FilterNodeEventArgs e)
        {
        
            if (Convert.ToString(e.Node[colName]) == "col_value")
            {
                e.Node.Visible = false;
                e.Handled = true;
            }
        }

    • इस ब्लॉग के लिए सामाजिक शेयर

पोर्फोलिओ और ब्लॉग
Logeswari M J विभिन्न कंपनियों का अनुसरण करता है, ये कंपनियां और नियोक्ता Logeswari के फिर से शुरू देख सकते हैं
सबसे अच्छा नौकरी के अवसर पाने के लिए अपना फिर से शुरू करें अपलोड करें

मुफ्त रजिस्टर करें!