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

RE: Paging with the DataGriView control by SundarNarasiman

SundarNarasiman
Mon Feb 26 23:52:15 CST 2007

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.


--
Thanks & Regards,
Sundar Narasiman


"Ben" wrote:

> 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

Re: Paging with the DataGriView control by RobinS

RobinS
Tue Feb 27 01:18:39 CST 2007

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.
----------------------
"Ben" <Ben@discussions.microsoft.com> wrote in message
news:901ED411-919E-4394-A5CB-5E6898D07781@microsoft.com...
> 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



RE: Paging with the DataGriView control by Ben

Ben
Tue Feb 27 07:03:18 CST 2007

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

RE: Paging with the DataGriView control by SundarNarasiman

SundarNarasiman
Tue Feb 27 10:25:12 CST 2007

Ben,

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

--
Thanks & Regards,
Sundar Narasiman


"Ben" wrote:

> 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

RE: Paging with the DataGriView control by Ben

Ben
Tue Feb 27 11:52:12 CST 2007

Thanks guys, your post was very helpful.