After filterBy newly added row wiping out

Hi,

I am using the grid filterBy function for date filter which applied on a column, and grid with data is already loaded.
When i use filterBy to find the rows data and add a new Row it works fine but when i again apply a new filter for displaying data between date the all newly added row is wiping out and previous data is displaying.

When i try to delete some row again same things happened the deleted rows are still visible.

Have look the applied filterby logic

grid.filterBy(col, (data, row ) ->
if (dPDate <= dEDate && dPDate >= dSDate)
return data

Please provide any solution or guidance.
thanks a lot
ankit

Please check docs.dhtmlx.com/grid__filtering … lteredgrid

Thanks Stanislav,

I applied its works i already added some custom code after clear buffer.

Hello,

I have a grid where I filter out items and delete a row and when I remove the filter it stops with the following error

dhtmlxgrid.js:5991 Uncaught TypeError: Cannot read property ‘_childIndexes’ of null

Similar:
The grid doesn’t preserve row changes (adding, deleting), which are made when the grid is filtered. After resetting back to the not-filtered state, the grid restores deleted rows and removes the newly created ones. To work around the issue you can use the following order of actions:
mygrid.filterBy(0,""); //unfilters the grid
mygrid._f_rowsBuffer = null; //clears the cache

grid.addRow(…);// adds some row

grid.filterByAll();// filters the grid back

docs.dhtmlx.com/grid__filtering … lteredgrid