Author Topic: refreshing a grid that is filtered  (Read 2524 times)

[email protected]

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 3
    • View Profile
refreshing a grid that is filtered
« on: June 19, 2015, 11:09:23 pm »
When I take the following steps, I get strange results; some records in dataModel.data are never available in the view.  All of this is for local data, and local filtering.
1. Initialize the grid, with header filtering, and no paging.
2. Load dataset "A". (i.e. set dataModel.data = dataSetA)
3. Using a column header, specify a filter condition, so that not all rows in dataSetA are in the view.
4. Load dataset "B", thereby replacing dataset "A" (i.e. dataModel.data = dataSetB)
5. RefreshDataAndView.
6. Clear the filter condition from step 3.
We would expect that ALL of the rows from dataset "B" would be in the view.  But they are not!
It seems that, if there is filtering on the view when the dataModel.data is changed, then some rows will be permanently hidden, regardless of the filtering condition.
Where is the filtered data stored?  Not in dataModel.data?
Where is the unfiltered data stored?  Is it accessible somehow?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: refreshing a grid that is filtered
« Reply #1 on: June 22, 2015, 01:22:42 pm »
records are removed from dataModel.data ( and stored in another property of dataModel ) when local filtering takes place and they are restored back to dataModel.data when filter is removed, so only filtered data is in dataModel.data.

Please clear the filtered condition (step 6) before loading dataset B (step 4) to get correct results, otherwise the unfiltered rows from datasetA get merged with datasetB.

It has been corrected in the next version so that you when you switch the dataset, the unfiltered rows from previous dataset are removed too.

Could you please mention the reason for need to access unfiltered rows.
« Last Edit: June 22, 2015, 05:20:31 pm by paramquery »