new day, new question: my porpouse is to use a edit field (TuniEdit) to filter the TuniTreeView, showing only the leap of the tree matching the text content of TuniEdit.
I use following code into onKeyDown event of Tuniedit:
if (key = vk_return) then for i := 0 to uniTreeView1.items.count - 1 do begin // check is a leap if not uniTreeView1.items[i].HasChildren then begin // check the text contenct if Pos(UpperCase(uniEdit1.text) , UpperCase(uniTreeView1.items[i].text) ) > 0 then begin // show item/node uniTreeView1.items[i].Visible := True; end else // hide item/node uniTreeView1.items[i].Visible := False; end; end;
Obviusly the code is correct, but it is server side, so my tree html object is not affected! How can i do that client side?
I found an example for extjs where the guy use setDisplayed('none'); method of the node to hide the node, but i don't know how to identify the current node (like nameJS) in my for cycle.
If I know the js name/identifyer of a single node, I can use unisession.addjss inside the for cycle to set displayed property.
I think is the right way to do that, evenif i hope some one can help me to find the right way.
PS: in order to implement the example i have linked before, there is some place in unigui object where define the filterby function, like Ext.define(...) in extJs code ?