Can you use a DataView to return only the first say 10 rows of a
dataset? If so, how?

Thanks,

Re: Use DataView to return the first n rows by Miha

Miha
Mon Jul 26 04:36:01 CDT 2004

Hi Stephen,

No, you can't. You could if each row would carry a row number (by setting
RowFilter property).

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"Stephen Miller" <jsausten@hotmail.com> wrote in message
news:cdb404de.0407252331.16144daf@posting.google.com...
> Can you use a DataView to return only the first say 10 rows of a
> dataset? If so, how?
>
> Thanks,



Re: Use DataView to return the first n rows by Oleg

Oleg
Mon Jul 26 07:29:28 CDT 2004


You most likely need to perform this logic in the code that uses your
DataView.
For example, databound controls such as DataGrid implement their own paging.

Otherwise, use DataView.CopyTo() to copy items into an array, then copy just
the rigth number of records into another array, e.g. ArrayList.

-Oleg.

"Stephen Miller" <jsausten@hotmail.com> wrote in message
news:cdb404de.0407252331.16144daf@posting.google.com...
> Can you use a DataView to return only the first say 10 rows of a
> dataset? If so, how?
>
> Thanks,



Re: Use DataView to return the first n rows by Marina

Marina
Mon Jul 26 08:29:48 CDT 2004

If you need to page your data , try the PagedDataSource class.

"Stephen Miller" <jsausten@hotmail.com> wrote in message
news:cdb404de.0407252331.16144daf@posting.google.com...
> Can you use a DataView to return only the first say 10 rows of a
> dataset? If so, how?
>
> Thanks,