GridView WinForms Paging

53 posts, 2 answers
  1. Terry
    Terry avatar
    1 posts
    Member since:
    Sep 2007

    Posted 04 Oct 2007 Link to this post

    I have found plenty of examples of paging GridView using asp.net. Does anyone have any examples using WinForms GridView with MS 2005 SQL?

    Thanks.
  2. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 05 Oct 2007 Link to this post

    Hello Terry,

    Thank you for this question.

    We do not support such a feature in RadGridView because in a desktop application there is no need to use paging. In the web one would prefer to keep the broadband as low as possible, however on a desktop there are no such limitations. Could you give us more details on this feature? It is possible that your case is rather specific, so we would like to hear it.

    Thanks in advance.
     

    Greetings,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Luca Mancuso
    Luca Mancuso avatar
    20 posts
    Member since:
    Oct 2005

    Posted 12 Nov 2007 Link to this post

    it's not true that in the windows application is not useful, when we have grid with 10.000 or over row to open the windows became very slow. A good thing can be that the control didn't design or load all the row in the grid but the first N-Row and when I scroll that grid load the other row.
  4. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 12 Nov 2007 Link to this post

    Hello Luca Mancuso,

    Thank you for this response.

    Unfortunately, paging is not in our TODO list for the moment. We will reconsider this if more people request the same feature. In a WinForms application it preferable to use the scrollbars instead of paging.  If you need paging functionality, it is relatively simple to implement it for a custom scenario.

    Don't hesitate to contact us if you have other questions.

    All the best,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Pawz
    Pawz avatar
    51 posts
    Member since:
    Aug 2007

    Posted 06 Dec 2007 Link to this post

    A much more common usage of anything with 10,000 records would be to return the top 1000 rows, and then allow the user to filter the grid by whatever criteria is appropriate.. loading 10,000 records at a time is excessive way before you even get to the grid :).
  6. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 07 Dec 2007 Link to this post

    That's right, Pawz. We think that functionality similar to the paging technique in web can be realized externally through smart SQL queries. We will consider providing a sample demonstrating paging in RadGridView as a KB article on our site.
     

    Best wishes,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Luca Mancuso
    Luca Mancuso avatar
    20 posts
    Member since:
    Oct 2005

    Posted 07 Dec 2007 Link to this post

    the problem is not create the the paging with the query, in this way we lose the powerful of the filter, a good idea is not load all the 10.000 row in the same time, I mean when I load the dataset I have all 10.000 row but the long time is the time that the grid spend to load all the row in the grid. A good things can be that the grid load the first 400 rows ( for example) and when I move with the vertical scroll of the grid it load the next 400 rows. I made the same procedure on vb6 with my controls and it's the best solution.
  8. Pawz
    Pawz avatar
    51 posts
    Member since:
    Aug 2007

    Posted 09 Dec 2007 Link to this post

    I can't see it being the best way though - you're still hitting the database for thousands of records that the user never looks at, nor cares about.

    I mean, your solution is probably a good way to go, and would work.. it's just the underlying design decision I'd question :).
  9. Luca Mancuso
    Luca Mancuso avatar
    20 posts
    Member since:
    Oct 2005

    Posted 09 Dec 2007 Link to this post

    the fast is that to load a dataset with 10.000 record you spend about 1 sec, but you load in the grid you can spend many many more time. Than if you load a top n element and you want use the filter you lose the possibility to do because you must again to the query, the most long part is the draw the item on screen so if you reduce the number of record the time to wait it's very less. Ok the best solution could be if the dataset has the page implementation but it's more easy implement the "paging" with scroll that create a dataset or datatable with paging
  10. Dimitar Kapitanov
    Admin
    Dimitar Kapitanov avatar
    632 posts

    Posted 11 Dec 2007 Link to this post

    Hi guys,

    There are several different approaches when loading large datasets, for example paging (used mostly in ASP.NET datagrids), virtualization, etc.

    We are working/researching three different approaches for the RadGridView at the moment. Whether all or some of them will be implemented depends on the approach's metrics and stability. We are still collecting data through tests and time will tell which ones will appear in the next RadGridView version. Nevertheless, we will be glad to hear your opinion on these approaches.

    Here they are:
    1. Virtualized grid (columns and rows) - this approach allows you to use the grid as a thin UI layer where all specific data logic could be put outside the control.
       
    2. Asynchronous binding - here a worker thread processes the data in the background, and periodically updates the internal data pool of the grid. Then the grid refreshes just after the required amount or UI artifacts are prepared.
       
    3. Paging the data source - this is the hardest one, in my believe. Not the implementations, but the specific logic needed for grouping/filtering/sorting (as those are processes that are placed after the data is processed internally by the grid).

    Your feedback will be appreciated.

     
    All the best,

    Dimitar Kapitanov

    the Telerik team


    Instantly find answers to your questions at the new Telerik Support Center
  11. Luca Mancuso
    Luca Mancuso avatar
    20 posts
    Member since:
    Oct 2005

    Posted 11 Dec 2007 Link to this post

    personally I prefere the first. specially because I work with asynchron dataset so I load the data in 1 dataset and after I work "offline" and I don't refresh the data till the moment that I need. So the virtualization for me it's the best way that permit to work in synchron or asynchron way and resolve most of the problem.
  12. Answer
    Pawz
    Pawz avatar
    51 posts
    Member since:
    Aug 2007

    Posted 11 Dec 2007 Link to this post

    I would go with the virtualization as well. Getting the logic of handling the data out of the grid itself and allowing us programmers to handle it all would probably be a more flexible solution than trying to automate some kind of paging solution.

    It's probably the least designer-friendly pick of the three, but I'd think that it would bump the grid to the next level in power & flexibility. Just so long as there is documentation :)
  13. Alaki
    Alaki avatar
    1 posts
    Member since:
    May 2008

    Posted 16 May 2008 Link to this post

    I have above 100,000 record. with loading all data into RAM and transmission in network, make performance decrease. for refreshing and loading new data it must repeat.

    i think that paging is necessary for winform applications too.

  14. Nikolay
    Admin
    Nikolay avatar
    1805 posts

    Posted 17 May 2008 Link to this post

    Hi Alaki,

    Thank you for your opinion on this matter.

    Currently, we do not have plans the implement paging in our RadGridView. However, your vote is appreciated and logged as a feature request into our tracking system.
     

    Sincerely yours,
    Nikolay
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  15. Basheer Al Ghazawi
    Basheer Al Ghazawi avatar
    3 posts
    Member since:
    Jun 2008

    Posted 23 Sep 2008 Link to this post

    Dears,

    Please note that we have 70,000+ records and we are facing major issues in loading them. It takes few seconds to get the records from the database, however. It takes long time trying to render them at the grid.

    Finally, we would like to maintain the nice features of GridView e.g. Grouping, etc. Moreover, I believe powerful controls like RadControls for WinForms should be able to handle this number of records.

    Best regards,

    // Basheer Al Ghazawi

    JValley Software Solutions  

    The Essence of Quality !!

  16. Pawz
    Pawz avatar
    51 posts
    Member since:
    Aug 2007

    Posted 23 Sep 2008 Link to this post

    Don't forget to call radGridView1.GridElement.BeginUpdate(); and EndUpdate();  before and after you've loaded the data into the datasource. Check the examples to see how it's done - that will speed up your grid rendering remarkably.
  17. Nikolay
    Admin
    Nikolay avatar
    1805 posts

    Posted 26 Sep 2008 Link to this post

    Hello guys,

    Basheer, RadGridView supports row virtualization, so it is capable of loading and showing huge number of records. In other words, you should not experience any issues concerning this. However, if the number of columns is big, you may encounter a performance lag, because currently RadGridView does not support column virtualization. We are working on this feature and it will be implemented in one of our next versions.

    As to the second issue, it will be best if you send us a sample project that reproduces the issue. This will allow us to investigate the case further, to address any potential issues and to suggest optimizations if such are possible.

    Pawz, radGridView1.GridElement.BeginUpdate() and EndUpdate will indeed boost performance, but only if you are manually inserting numerous rows in RadGridView.


    Kind regards,
    Nikolay
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  18. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 05 Feb 2010 Link to this post

    My vote registered too for in-built paging into the datagrid.
    I agree, that a well structured SQL query can return many records very quickly, but actually rendering them to the screen takes many times longer.
    It would certainly be a nice to have feature.
    Richard
  19. Nikolay
    Admin
    Nikolay avatar
    1805 posts

    Posted 08 Feb 2010 Link to this post

    Hi Richard Slade,

    Thank you for your vote.

    Please note that RadGridView uses virtualization for its cells, so not all the data cells are rendered. For additional information, refer to the following help article: Logical vs. Visual Grid Structure.

    As to the paging feature, you can easily achieve such behavior using LINQ. For additional information, please refer to the following blog post: Emulating Paging with RadGridView for WinForms and LINQ with 1 million records.

    Sincerely yours,
    Nikolay
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  20. randall
    randall avatar
    40 posts
    Member since:
    Apr 2009

    Posted 11 Feb 2010 Link to this post

    I vote for the paging too.
    i have a application that calls the Data from a online server. So it basicly works like the ASP.net but is not a web solution.
    therefore i'd like to page the  data in so that the network connections are limited.

    id there another way to do this in code maybe?

    thanks
  21. Nikolay
    Admin
    Nikolay avatar
    1805 posts

    Posted 16 Feb 2010 Link to this post

    Hello randall,

    Thank you for your vote.

    Please note that RadGridView is a UI control which just represents the data taken from a DataSource in a pleasant and understandable way. However, it is not a duty of RadGridView to take limited amount of data from your database. In case we decide to implement paging, it will be just a visual paging which will display a given number of records on a page. However, this feature will not limit the network connections.

    You can refer to my previous post which gives a link to a page implementation with the help of LINQ to SQL.

    Best wishes,
    Nikolay
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  22. husam
    husam avatar
    1 posts
    Member since:
    Sep 2010

    Posted 30 Sep 2010 Link to this post

    Dear Telerik Team,

    guys you have to create the paging for the desktop application's because really it's needed as Luca Mancuso said and also
    we have too much different scenario's that need paging 
  23. Nikolay
    Admin
    Nikolay avatar
    1805 posts

    Posted 04 Oct 2010 Link to this post

    Hello husam,

    Thank you for your vote.

    As I mentioned above, you can use the approach given in the following blog post: Emulating Paging with RadGridView for WinForms and LINQ with 1 million records.

    Currently, I am not able to provide you with a specific time frame concerning the built-in paging feature.

    Regards,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  24. James
    James avatar
    3 posts
    Member since:
    Jun 2010

    Posted 12 Oct 2010 Link to this post

    Hello,

    I ve same scenario, where there are 20,000 rows which are having grouping facility.
    Also, one columns is continuiosly updating value like Price of stock, some of the columns have expression using that price of stock.
    Now on continuous Refreshing of Price is making Grid unresponsive to user.
    Thats why i am seraching for resolving issue.
    I found this forum, and some virstual mode function.
    Is it possible to use this feature with DataTable as binding source????

    Can you please provide sample code shows use of virtual mode in radgridview with Datatable binding?
    Or Any other solution???
  25. Answer
    Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 12 Oct 2010 Link to this post

    Hello James,

    For more information on how to implement virtual mode for the RadGridView, please take a look at this help article.

    But i have to warn you that from what i now, RadGridView does not process filtering, sorting, and grouping in Virtual Mode. Only the UI and expression collections are updated.

    You can use FilterChanged, SortChanged, and GroupByChanged events to implement you logic for virtual mode. The events notify for a change in the related expression collections and send updates to RadGridView UI to fire CellValueNeeded event to fill again the displayed cells in the current grid view.

    There were some plans to include this in the future versions, but from what i know this hasn't happened yet.

    But as the previous replies have stated, the fact of the matter is with Linq you are getting just the data you can see, and from what i understand, this could be a problem in your case because you need to be able to change the values on the entire DataSet, DataTable?

    Another easier option is to use a timer, that would perform a refresh every x seconds.

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga

  26. Jaco Van Zyl
    Jaco Van Zyl avatar
    4 posts
    Member since:
    May 2006

    Posted 18 Jan 2011 Link to this post

    Please register my vote also!
  27. David Tabatadze
    David Tabatadze avatar
    9 posts
    Member since:
    Apr 2010

    Posted 31 Jan 2011 Link to this post

    Hey guys.

    I have read this thread and i'd like to vote too.

    I strongly believe that paging option in grid is one of the most important

    (i mean in real projects, where the data is really big - thousands, maybe millions)

    Hope this option will appear soon...

  28. Nikolay
    Admin
    Nikolay avatar
    1805 posts

    Posted 03 Feb 2011 Link to this post

    Hello guys,

    Thank you for your votes.

    Regards,
    Nikolay
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
  29. subbarayan
    subbarayan avatar
    20 posts
    Member since:
    Oct 2008

    Posted 04 Feb 2011 Link to this post

    me toooooooo...
  30. Stefan
    Admin
    Stefan avatar
    2901 posts

    Posted 09 Feb 2011 Link to this post

    Hello everyone, 

    In order to make this voting easier, I have added this request to our Public Issue Tracking System where you can add your votes, comments and subscribe to the status updates regarding the feature. You can find the PITS item at this link.

    Regards,
    Stefan
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
Back to Top