c# - Remove link from treeview parent node -


is there way can keep text of parent node remove link? treeview parent node used header, no navigation. great. thanks.

private void bindnodes(string ptid)   {       if (ptid != "")       {           int patientid = convert.toint32(ptid);           dbconnection dbobj = new dbconnection();           if (session["activepatient"] != null)           {               string[] subchild = new string[4];               subchild[0] = "demographics";               subchild[1] = "medication reviews";               subchild[2] = "drug testing & monitoring";               subchild[3] = "other program";             treenode otrparent = new treenode();               //trv_patient.parentnodestyle = "none";             //otrparent.selectaction.style.add("display", "none");             treenode otrsubchild1;             treenode otrsubchild;             (int = 0; < 4; i++)             {                 otrsubchild1 = new treenode();                 otrsubchild1.text = subchild[i];                 if (i == 1)                 {                     patientinfocollection patientcollection = new patientinfocollection();                     patientcollection = dbobj.getmedicationreviews(patientid);                     foreach (patientinfo au in patientcollection)                     {                         otrsubchild = new treenode();                         patientinfo patient = new patientinfo();                         otrsubchild.text = au.datercvd.value.tostring("mm-dd-yyyy")                         otrsubchild.target = au.reviewid.tostring();                         otrsubchild1.childnodes.add(otrsubchild);                     }                     otrsubchild = new treenode();                     otrsubchild.text = "add medication review";                     otrsubchild.target = "new";                     otrsubchild1.childnodes.add(otrsubchild);                 }                 trv_patient.nodes.add(otrsubchild1);             }         }     } } 

if temp such node text want plain text , not link use code below.

treenode temp = new treenode("text"); temp.selectaction = treenodeselectaction.none; treeview1.nodes.add(temp); 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -