we have a grid with approx 2000 items in. we also have a filter box at the top of each column. when the user enters filter criteria it filters correctly.
however we need the following functionaility but are unsure of the best way to do it…
when the user has applied the criteria and are left with only a few rows, the user selects the row, then if they remove the filter criteria from the filter box and the rest of the rows show we still want the grid to scroll to the selected row. right now it is showing all rows when we remove the filter criteria but we have lost the selected row
You can use onFitlerEnd event as
var id = mygrid.getSelectedRowId();
we are trying the code that you suggested and this is having no effect.
we mean when the filter text is set to blank (when the user removes the text that it is in the filter box) - this loads all rows back into the grid but the selected row is no longer in view, the user must manually scroll down to it…
what is the best way to do this please?
Please check the attached sample.
filter_scroll.ZIP (82.8 KB)
ok, we see this does work in a grid but it does not work in treegrids that use a filter, how can we get it to work for treegrids?
showRow will not work for items which are inside closed branches.
you can try to use the next line as first line of onFilterEnd handler
as result it will open related branch, after that existing code must work correctly