winforms - C# TreeViewAdv get selected node's value -


i using syncfusion's treeviewadv in multi column mode.

i trying selected node's value (from first column) have not been successful.

has been able this?

many thanks

edit:

a quick update on how populating control

    private void refreshoptions()     {         list<string> objects = globals.thisaddin.utilities.listrobjectswithdetail();         stringbuilder name = new stringbuilder(100);         stringbuilder details = new stringbuilder(200);         node datarootnode = new node();         node dataparentnode = new node();         node datachildnode1 = new node();         node datachildnode2 = new node();         node datachildnode3 = new node();         node functionsrootnode = new node();         node functionsparentnode = new node();         int charlocation;         int indexchild;         int childlevel;         treemodel _model = new treemodel();         treeviewadv1.model = _model;         treeviewadv1.beginupdate();          datarootnode = new columnnode("data / values", "", "");         _model.nodes.add(datarootnode);          functionsrootnode = new columnnode("functions", "", "");         _model.nodes.add(functionsrootnode);          foreach (string obj in objects)         {             name.clear();             details.clear();             name.append(obj.trim());             charlocation = name.tostring().indexof(":");             details.append(name.tostring().substring(charlocation + 1).trim());             name.length = charlocation;              if (details.length >=10 && details.tostring(0, 10) == "function (")             {                 functionsparentnode = new columnnode(name.tostring(), "function", details.tostring());                 functionsrootnode.nodes.add(functionsparentnode);             }             else             {                 indexchild = name.tostring().indexof("$");                 if (indexchild > -1)                 {                     childlevel = name.tostring(0, indexchild).split('.').length - 1;                     name.remove(0, 1 + childlevel);                      switch (indexchild)                     {                         case 1:                             datachildnode1 = new columnnode(name.tostring(), "data / value", details.tostring());                             dataparentnode.nodes.add(datachildnode1);                             break;                         case 2:                             datachildnode2 = new columnnode(name.tostring(), "data / value", details.tostring());                             datachildnode1.nodes.add(datachildnode2);                             break;                         case 3:                             datachildnode3 = new columnnode(name.tostring(), "data / value", details.tostring());                             datachildnode2.nodes.add(datachildnode3);                             break;                     }                 }                 else                 {                     dataparentnode = new columnnode(name.tostring(), "data / value", details.tostring());                     datarootnode.nodes.add(dataparentnode);                 }              }         }         nodetextbox ntb = new nodetextbox();         ntb.datapropertyname = "text";         this.treeviewadv1.nodecontrols.add(ntb);         treeviewadv1.endupdate();     } 

i spent time looking @ treeviewadv sample project. looked "folderbrowser.cs" winform did have below nodemousedoubleclick event. correctly wrote node tot console.

        private void _treeview_nodemousedoubleclick(object sender, treenodeadvmouseeventargs e)     {         console.writeline(e.node);     } 

if use same event e.node = "" although node populated.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -