We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Issue with syncfusion tool bar

Thread ID:

Created:

Updated:

Platform:

Replies:

69671 Nov 7,2007 10:01 AM Nov 12,2007 02:42 AM Windows Forms 1
loading
Tags: Grouping
Michael Kunstelj
Asked On November 7, 2007 10:01 AM

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


Mohamed Suhaib Fahad A. [Syncfusion]
Replied On November 12, 2007 02:42 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;