Paging of large Database Table

8 posts, 0 answers
  1. Peter
    Peter avatar
    97 posts
    Member since:
    May 2016

    Posted 10 May 2017 Link to this post

    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

     

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3708 posts

    Posted 10 May 2017 Link to this post

    Hello Peter, 

    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
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Peter
    Peter avatar
    97 posts
    Member since:
    May 2016

    Posted 10 May 2017 Link to this post

    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

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3708 posts

    Posted 12 May 2017 Link to this post

    Hello 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
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Aseman
    Aseman avatar
    38 posts
    Member since:
    Aug 2019

    Posted 01 Jan in reply to Dess | Tech Support Engineer, Sr. Link to this post

    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

  6. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3708 posts

    Posted 03 Jan Link to this post

    Hello, Aseman,     

    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

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  7. Aseman
    Aseman avatar
    38 posts
    Member since:
    Aug 2019

    Posted 04 Jan in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Hello Dess 
    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...
  8. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3708 posts

    Posted 07 Jan Link to this post

    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

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top