Hi,
I have been running into a problem with programmatically filtering a grid. I have been using the IColumnFilterDescriptor & DistinctFilter, it works but they are very slow when the number of items to filter is high.
I have a grid of around 20K rows, and I'm adding about 200 items to the Distinct filter. This can take minutes to filter during which the UI is blocked and sometimes crashes completely.
What's the best way to filter a large grid by a large number of distinct items ?
Also from my code snippet below, you can see what I'm actually trying to do is filter my grid by the currently selected rows, is there a better way of doing this without using the DistinctFilter ?
Thanks,
Richard
I have been running into a problem with programmatically filtering a grid. I have been using the IColumnFilterDescriptor & DistinctFilter, it works but they are very slow when the number of items to filter is high.
I have a grid of around 20K rows, and I'm adding about 200 items to the Distinct filter. This can take minutes to filter during which the UI is blocked and sometimes crashes completely.
What's the best way to filter a large grid by a large number of distinct items ?
Also from my code snippet below, you can see what I'm actually trying to do is filter my grid by the currently selected rows, is there a better way of doing this without using the DistinctFilter ?
Thanks,
Richard
IColumnFilterDescriptor columnFilter = matchingColumn.ColumnFilterDescriptor;
columnFilter.SuspendNotifications();
matchingColumn.ClearFilters();
List<
int
> filterItems = (from DeploymentItem row
in Grid
DeploymentList.SelectedItems select row.DeploymentId).ToList();
foreach
(
int
deplymentId
in
filterItems) columnFilter.DistinctFilter.AddDistinctValue(deplymentId);
columnFilter.ResumeNotifications();