Hi,
I use Entity Framework (Database first) and want display a table with millions of data in a paged Radgridview.
It is not possible to load all data local with
dbContext.MyTable.Load();
radGridView1.DataSource = dbContext.MyTable.Local.ToBindingList();
Is there an example, which also support sorting and filtering of the Radgridview?
Thank you,
Peter
7 Answers, 1 is accepted
Thank you for writing.
According to the provided information, I would recommend you to use RadVirtualGrid which is a grid component developed on top of Telerik Presentation Framework which provides a convenient way to implement your own data management operations and optimizes the performance when interacting with large amounts of data. Additional information is available in the following help articles:
http://docs.telerik.com/devtools/winforms/virtualgrid/overview
http://docs.telerik.com/devtools/winforms/virtualgrid/sorting/sorting
http://docs.telerik.com/devtools/winforms/virtualgrid/paging/paging-overview
http://docs.telerik.com/devtools/winforms/virtualgrid/filtering/filtering
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Telerik by Progress
Hi Dess,
thank you. The hint for RadVirtualGrid is good and also the help articles.
But in the examples the whole data is read inside Selectdate (filtered and sorted) in data chache.
At start is no filter is applied and millions of datarows can not read.
Exist also support or example for paging read from Entity framwork?
Regards,
Peter
Thank you for writing back.
The example fills the whole data in a dummy object just for simplicity. However, you can select only the first 100 records for example and when you scroll to the bottom, to extract the next 100. This is the possible approach for loading data in portions in RadVirtualGrid. Please refer to our Demo application >> VirtualGrid >> Web Service example which demonstrates a sample approach. The Demo application can be found in the installation folder of the suite.
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Telerik by Progress
Hello dear Dess
Would you please do me a favor?
Please Give Me A sample Project Of VirtualGrid with Filtering -Sorting -Paging in WinForm.
I`m waiting for your answer.
Thank you
After installing the Telerik UI for WinForms suite, you can run the Demo application which is located in the installation folder of the suite (C:\Program Files (x86)\Progress\Telerik UI for WinForms R3 2019\Examples\QuickStart\Bin). It offers a great diversity of examples in both, C# and VB.NET. The Demo application >> VirtualGrid >> First Look example will show you how to handle the RadVirtualGrid.SortChanged event and implement sorting behavior. There are several example about filtering and paging as well.
In addition to the above mentioned complete examples, I would recommend you to have a look at the previously referred help articles which will explain in details how the sorting, filtering and paging works in RadVirtualGrid:
http://docs.telerik.com/devtools/winforms/virtualgrid/sorting/sorting
http://docs.telerik.com/devtools/winforms/virtualgrid/paging/paging-overview
http://docs.telerik.com/devtools/winforms/virtualgrid/filtering/filtering
I hope this information helps.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
in Your Examles for filtering or sorting or even PAGING, In One Time the Whole Data is Recieved From Database.
it is not ServerSide filtering or ServerSide sorting or ServerSide PAGING at all.
when i programmatically wrote codes for ServerSide filtering or ServerSide sorting or ServerSide PAGING ,
the rad Virtual Grid just Show "Page Count = 1" and also " buttonCount =1" As I said in Rad Grid View Some Dayes ago.
it drives me crazy....:(
You told me Use rad Virtual Gridview .its serverside Operations But I can not See it...
Hello, Aseman,
RadVirtualGrid doesn't provide any integrated server-side operations. Consider it as a container control with cells. When scrolling it (vertical or horizontal), the values only for the visible cells are required and you need to specify the requested value.RadVirtualGrid provides a convenient public API for populating its cells with data by using the CellValueNeeded event. When a cell value is required, the CellValueNeeded event is fired. Considering the demanded RowIndex/ColumnIndex you can extract the respective value from your external data source.
It doesn't matter whether it is a DataTable, a service, a table from the data base, a collection of custom objects. RadVirtualGrid just needs the VirtualGridCellValueNeededEventArgs.Value property to be set. It is up to you to extract the relevant data and it is not quite related to RadVirtualGrid and how to query the data from the server. RadVirtualGrid just provides the public API for filling the data on demand but the data-operations has to be performed outside the grid itself.
Should you have further questions please let me know.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik