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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set a filter a GridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

96005 Aug 15,2010 03:29 PM UTC Aug 23,2010 05:27 AM UTC WinForms 5
loading
Tags: GridControl
Cheranga
Asked On August 15, 2010 03:29 PM UTC

Hello,
I am using Syncfusion 6.4.0.15 version. I am using the GridControl since the data list which I'm showing is very large, and the insertion of new records to it is moderately high (20-50 new records per second). The problem which I am facing is I need a way to set a filter to this grid. I used Hidden rows to do the trick but it wasn't a good solution because of the flickering. Please give me some valuable advice on this.

Regards
Cheranga

Christopher Issac Sunder K [Syncfusion]
Replied On August 16, 2010 10:31 AM UTC

Hi Cheranga,

Thank you for your interest in Syncfusion products.

In the GridControl, for binding it with data list, it populates every time when a new record added. To increase the performance of the GridControl, you can make use of “Virtual Grid” and update/insert the records using “QueryCellInfo” event. A sample about this virtual grid has shipped in our Dashboard.

Please find it from the following location.

{InstalledDrive}:\{Authendication}\{UserName}\AppData\Local\Syncfusion\EssentialStudio\{Version}\Windows\Grid.Windows\Samples\2.0\Virtual Grid\Virtual Grid Demo\CS

Please let me know if you have any other concerns.

Regards,
Christo.

Cheranga
Replied On August 16, 2010 02:03 PM UTC

Hello Christo!
Thank you for your reply, but I am allready using it as a Virtual grid and yes I am using the "QueryCellInfo" to set the values. My problem is I cannot find an appropriate way to set a "filter" to this grid, while the data is getting inserted( so only a selected set of data will be shown in the grid according to the filter criteria). I even tried "gridControl.HideRows.SetRange()" method but it wasn't the best solution because of the heavy flickering. I would be very pleased if you can give me some advice on this.

Thanks again!

- Cheranga -

Jisha Joy [Syncfusion]
Replied On August 19, 2010 11:49 AM UTC

Cheranga,

Currently, there is no support in GridControl for filtering. So, if you need to support filtering, you would have to design and implement some way to do it.

One way you could do this is to maintain an arraylist of visible row indexes. Then handle the QueryCellInfo event and QueryRowCount event. Use QueryRowCount to provide the arraylist.Count as the number of rows in the grid. Then in QueryCellInfo use the arraylist to get the proper visible row. The VirtTreeGrid sample uses sort of this technique to dynamically display differing numbers of rows..

Regards,
Jisha

Cheranga
Replied On August 20, 2010 04:58 PM UTC

Jisha,

Thank you for your suggestion. I will have a look at the virttree sample.
Thanks!

- Cheranga -

Jisha Joy [Syncfusion]
Replied On August 23, 2010 05:27 AM UTC

Hi Cheranga ,

Thank you for your update.


Regards,
Jisha

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.

Warning Icon 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.Close Icon

;