Reputation: 17701
I am looking for paging techniques for datagird view used in winforms applications...
For this i have looked around the google but dint find any options for winforms datagrdiview but i have found the solutions for web apps..
would any one pls give any idea or any source code for how to implement the paging techniques for datagrid view ...
I am using linq ,for getting the data from database.. I am using linq and mysql as database.. and i am binding the datagrid view using linq to entities....
so if there are any techniques for linq to implement the paging techniques for datagrid view.. will be help ful to me ...
Thanks In advance for greatful ideas...
Upvotes: 0
Views: 16624
Reputation: 62246
As you writing Windows Form application that reads a data from MySQL, it's not good decision IMHO to implement a paging in DataGrid view. Basically you have to transfer on wire as small amount of data as you can.
So I would, personally, use a LIMIT
MySQL command to page on DB side, and after load the data to my app. You can always load 2,3 pages but show to user one, for faster and fluid GoForward/GoBack navigation between pages (preload data in short), but it's something that it's difficult to consider to me if it's a good solution or not as I don't know your project requirements.
For local paging you can simply split an array of rows you receive in subgroups and visualize one group per time.
Hope this helps.
Upvotes: 0
Reputation: 30115
Just tried to check if Google works correctly :)
How to paging a datagridview in winform?
A Simple Way for Paging in DataGridView in WinForm Applications
Hope this articles will be helpful for you.
Upvotes: 1