iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Latest Development Blogs
Browse By Tag
I am binding treeview at runtime by processing a List<T> appropriatly as a datasource where T is a class. Since Treeview doesn't have any inbuilt function which can make the searched node visibile to user. If treeview has large number of nodes than searching a bottom node always resides in bottom and scroll bar doesn't set appropriatly to bring that node up. However I got a work around to call ScrollIntoView() function, for searched node, on node expand event. This solution fails in a situation where searched node's grand parent is collapsed but its childrens are expanded. So when a grandparent expanded, its OnNodeExpand event fires for it only, not for its children as they already expanded.
Please let me know how can I trigger OnNodeExpand event for all children nodes as well (no matter if they already expanded).
... This solution fails in a situation where searched node's grand parent is collapsed but its childrens are expanded. ...
Please check out the snippet of JS function below.
var tv = ISGetObject("WebTreeView1");
var searchText = document.getElementById("txtSearch").value;
if(searchText != "")
var node = tv.FindNextNodeByText(searchText);
if (node != null)
alert("The search text can't be found");
alert("Please fill in the search text");
I use this JS function to search WebTreeViewNode by text. ExpandHierarchyAndSelect() is called instead of invoking the Select() method. This method, ExpandHierarchyAndSelect(), will expands and selects nodes in a hierarchy.
After hierarchy is expanded and node get selected, invoke scrollIntoView() to scrolls the selected node element into the visible area of the browser window.
This should helps.
Forgot your password | Sign up
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname
Already a member? Sign in