Categories | Question details Back To List | ||
Avoid filtering on selected rows Hi.. i'm using currentGrid.filterBy(0, function(a){ return (a>dateBorder); }) to filter grids wich are older then some days and i have a question.. Can i write the function inside in the way in wich it will always return true when currently tested cell is already selected (multiselect is turned on) ?? If it will simplify searching for good solution we can accept the rule that values from this column are unique... Any ideas? Answer posted by Support on Sep 10, 2008 06:33 Current version of filterBy functionality provides only cell value, which is not enough to implement desired usecase. Oncoming update will contain extended functionality , which will provide row id as last parameter, so it will be possible to use custom filtering function, in which row id will be checged agains results of grid.getSelectedRowId In current version of grid, as fast and dirty solution, next code can be used. var ids = grid.getSelectedRowId().split(","); var temp=[]; for (var i=0; i<ids.length; i++){ temp[i]=grid.cells(ids[i],0).getValue(); grid.cells(ids[i],0).setValue(SOME_BIG_VALUE); } currentGrid.filterBy(0, function(a){ return (a>dateBorder); }) for (var i=0; i<ids.length; i++) grid.cells(ids[i],0).setValue(temp[i]); |