Hi Michael,
Thanks for your interest in Syncfusion products.
Improving performance in using FilterBar when large number of records are used :
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You can improve the performance in using the FilterBar when large number of records are used. This can be achieved by using following steps:
1) Change ComboBox FilterBar to TextBox FilterBar by changing the CellType of FilterBarCell .
2) Change the DropDownStyle of FilterBarCell to Editable.
3) Apply filtering by setting characters typed in the FilterBarRow as expressions to TableDescriptor of GridGroupingControl in TableControlCurrentCellChanged event.
The following code snippet illustrates.
[C#]
private void gridGroupingControl1_TableControlCurrentCellChanged(object sender, GridTableControlEventArgs e)
{
GridCurrentCell cc = e.TableControl.CurrentCell;
GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(cc.RowIndex, cc.ColIndex);
if (style.TableCellIdentity.DisplayElement is GridFilterBarRow)
{
int rowIndex = this.gridGroupingControl1.Table.DisplayElements.IndexOf(style.TableCellIdentity.DisplayElement);
int colIndex = cc.ColIndex;
string colName = style.TableCellIdentity.Column.Name;
string expression = string.Format("[{0}] LIKE '{1}*'", colName, cc.Renderer.ControlText);
if (style.TableCellIdentity.Table.TableDescriptor.RecordFilters[colName] == null)
{
style.TableCellIdentity.Table.TableDescriptor.RecordFilters.Add(new RecordFilterDescriptor(colName, expression));
}
}
}
Please run the below sample , type any characters in the FilterBarRow, filtering will be applied immediately for the large set of records.
http://websamples.syncfusion.com/samples/Grouping.Windows/F69671/main.htmPlease let us know if this helps.
Regards,
Fahad