Paging with the DataGriView control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

Is it possible to view result sets with the DataGriView control,
instead of it showing all the results at once?
For example, showing the first 10 results, then the next 10 and so on,
just like in web pages.

Thanks,
Ben
 
Ben,

This is a good question. You have out-of-box paging support for ASP.NET 2.0
's GridView Control. Unfortunately we don't have that for DataGridView
Control of Windows Application.
We need to write custom code to figure out the paging
logic.
The following link has the snippet for this scenario.

http://www.codeproject.com/useritems/DataGridView_manipulation.asp

Please let me know whether this fixes your need.
 
Check out Virtual Mode for the DataGridView. I think it lets you do that,
or at least only loads n rows at a time.

Robin S.
 
I wonder why MS didn't implement it for us WinForms users.
Anyways, thanks for the info guys. I'll let you know if meets my needs.

Thanks,
Ben
 
Ben,

If our post was useful, please press "Yes" to the "Was this post helpful to
you" link.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top