RadVirtualGrid filtering with default FilteringRow

2 Answers 40 Views
DataFilter FilterView Form GridView VirtualGrid
Bilgehan
Top achievements
Rank 1
Iron
Bilgehan asked on 26 Sep 2024, 11:57 AM | edited on 26 Sep 2024, 12:20 PM

Hi,

I am trying to show data in a postgres DB in a RadVirtualGrid.  Data is big and continuously flows and changes, so I decided to use RadVirtualGrid, first I started witf RadGridView with VirtualMode on but decided to use RadVirtualGrid, hope thats the correct decision?

I can show the data correctly and get updates via LISTEN/NOTIFY mechanism of Postgres.(sometimes it stops updating but I think it is a postgres side problem) . I couldnt make the filtering work.

With regards to code I attached, Is it really possible to use the FilteringColumn which is shown when RadVirtualGrid.AllowFiltering==true.

When I enter a value to filter it doesnt work and filter textbox dissapears:

Here I hit 'APPLY FILTERS' button or pres enter key it show like below:

My reqs are:

* Display data with minimum delay

* Filter with column values. Some columns are decimal but some are enums so instead of writing the enum value in the filter having a dropbox (excel style) would be good.

* Filtering will work on all data not just on the visible rows in the grid. Also filtered grid should be updated when new data arrives.

*  Sorting (optional)

* Export data to XML (all data not only the visible rows)

 

Thanks in advance !

 

2 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 01 Oct 2024, 10:31 AM

Hi Bilgehan,

My name is Dinko and I will assist you today. I appreciate the provided sample project.

I have tried to run it, however, the control could not be populated due to a missing connection string. However, I have examined the code and if I have correctly read it, when the user enters a value in the filter cell, the data source is filtered and the Invalidate() method of the RadVirtualGrid control is called. Probably, that is why the filter cell is cleared. The general approach to filter the RadGridView is to use the FilterChanged event. You can read more about this functionality in the Filtering Overview help article. You can also check the next article which demonstrates how to apply filter programmatically. I think the first 3 requirements are related to the filtering mechanism. Give these articles a try and let me know how it goes.

For the sorting functionality, here the approach is similar to the filtering mechanism. Please, check the Sorting Overview to get more familiar with how this could be done.

Note that RadVirtualGrid does not load the entire data, it only requests the data that should be currently visible. That is why this control does not provide any export functionality. In general, you don't need the RadVirtualGrid to export the control. As I mentioned, the RadVirtualGrid control does not contain all data. The cell data is requested in the CellValueNeeded event. Currently, I can't suggest an export mechanism to export your data to XML. If you consider exporting it to XLSX format, you can use our SpreadProcessing Library. You can get familiar with how the library works. In a few words, you will need to iterate all objects in the data source and create a workbook. Then you can export it to various formats.

I hope that I was able to answer all your questions.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Bilgehan
Top achievements
Rank 1
Iron
answered on 01 Oct 2024, 09:57 PM
Thanks Dinko for the answer, I decided to use RadDataFilter instead of filteringrow. It works ok.
Tags
DataFilter FilterView Form GridView VirtualGrid
Asked by
Bilgehan
Top achievements
Rank 1
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Bilgehan
Top achievements
Rank 1
Iron
Share this question
or