c# - Search box in treeview with keyword search in asp.net -
i have treeview populated using database connection. want add search box treeview keyword search , returns parent nodes of trreview have keywords entered in search box.
do have make new treeview , apply search on , display treeviw if keyword in search box matches or can search in original treeview , show matched nodes , make visibility false others.
i have far written code only
string searchtxt = txt_search.text.trim(); foreach (treenode node in folderstructure.nodes) { if (node.text.startswith(txt_search.text.trim())) { node.select(); txt_search.text = ""; } }
every suggestion welcomed.
thanks
Comments
Post a Comment