Issue with syncfusion tool bar

We are using syncfusion version 5.2.0.25.

We added toolbar on our grid and found that it takes lot of memory and time.There is a direct performance hit.

We have a data table that contains 40,000 rows and 65 coulmns.
If we add filter bar it takes around 100MB memory.I have attached the code that we are using to add filter bar.

Please let me know if you need any further information.

source code:

private void AddFilterBar()
{
this.gridGroupingControl1.TopLevelGroupOptions.ShowFilterBar = false;
this.gridGroupingControl1.TableDescriptor.Appearance.FilterBarCell.BackColor = Color.AliceBlue;

for (int i = 0; i < gridGroupingControl1.TableDescriptor.Columns.Count; i++)
gridGroupingControl1.TableDescriptor.Columns[i].AllowFilter = true;
}

Thanks & Regards


1 Reply

MS Mohamed Suhaib Fahad A. Syncfusion Team November 12, 2007 07:42 AM UTC

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.htm

Please let us know if this helps.

Regards,
Fahad


Loader.
Up arrow icon