|
Title: tree-grid: scrolling to a selected row Post by: itay-g on January 21, 2014, 05:42:41 AM Hey,
I have implemented an excel-like search along with tree-grid, where the user can enter text, and the first row that contains the text on any of its columns gets selected. The problem is also want the scroll bar to 'jump' to the selected row. I've tried using 'ScrollTo' but it doesn't seem to do the trick. I've tried sending rowIndex and also sending the rowID but neither worked. Is ScrollTo supposed to work with tree-grid? any other suggestions? Thank you. Title: Re: tree-grid: scrolling to a selected row Post by: stworthy on January 21, 2014, 05:52:54 AM The method name is 'scrollTo' not 'ScrollTo'. When using in treegrid, you must pass the node id value to this method.
Code: var id = 34; // the node to scroll to Title: Re: tree-grid: scrolling to a selected row Post by: itay-g on January 21, 2014, 06:12:43 AM Thank you for the very quick response! :)
However, the ScrollTo mistake was only on the post and in the actual code it was written well. I didn't know about combining multiple calls like you did there, which is pretty sweet and I've changed it. Turns out the problem wasnt even that - I was using a splitter and the scrollbar I was seeing was the splitter's scrollbar instead of the tree-grid's scrollbar Should be fine now. Thanks! |