Howdy,

Here is what I have, I'm working on a search engine, where the results =
can be sorted, and paged through. (This is for a Web app btw)

My results of the search from the database are stored in a DataTable.

From this DataTable I create a DataView, that sorts the datatable.

Now I need to bind certain rows of this view to the DataSource, and here =
is where I'm running into problems. =20

Say I'm on page 4 of my results, and at 10 results per page, I need to =
bind rows 31-40 of this dataview to my control (a asp.net repeater). Is =
there some way I can filter this DataView based on the index of the =
items, not anything specific to the data itself. Or perhaps there is a =
way to copy these rows to another view (Didn't look possible) I know I =
can create another datatable and add rows manually from the view, but =
that just seems like too much overhead when I'm so close.

Any Ideas?
--Michael

Re: Only "View" specific rows in DataView by Marina

Marina
Wed Jun 02 11:36:55 CDT 2004

Take a look at the PagedDataSource class.

"Raterus" <raterus@spam.org> wrote in message
news:%23Ly3N8LSEHA.628@TK2MSFTNGP11.phx.gbl...
Howdy,

Here is what I have, I'm working on a search engine, where the results can
be sorted, and paged through. (This is for a Web app btw)

My results of the search from the database are stored in a DataTable.

From this DataTable I create a DataView, that sorts the datatable.

Now I need to bind certain rows of this view to the DataSource, and here is
where I'm running into problems.

Say I'm on page 4 of my results, and at 10 results per page, I need to bind
rows 31-40 of this dataview to my control (a asp.net repeater). Is there
some way I can filter this DataView based on the index of the items, not
anything specific to the data itself. Or perhaps there is a way to copy
these rows to another view (Didn't look possible) I know I can create
another datatable and add rows manually from the view, but that just seems
like too much overhead when I'm so close.

Any Ideas?
--Michael



Re: Only "View" specific rows in DataView by Raterus

Raterus
Wed Jun 02 11:57:41 CDT 2004

You mean I could have been using the datagrid's paging interface this =
whole time! Gah! I had never heard of this class until now, and it is =
certainly going to make my my life much easier! Thanks!
--Michael

"Marina" <someone@nospam.com> wrote in message =
news:%2315HS$LSEHA.1392@TK2MSFTNGP09.phx.gbl...
> Take a look at the PagedDataSource class.
>=20
> "Raterus" <raterus@spam.org> wrote in message
> news:%23Ly3N8LSEHA.628@TK2MSFTNGP11.phx.gbl...
> Howdy,
>=20
> Here is what I have, I'm working on a search engine, where the results =
can
> be sorted, and paged through. (This is for a Web app btw)
>=20
> My results of the search from the database are stored in a DataTable.
>=20
> From this DataTable I create a DataView, that sorts the datatable.
>=20
> Now I need to bind certain rows of this view to the DataSource, and =
here is
> where I'm running into problems.
>=20
> Say I'm on page 4 of my results, and at 10 results per page, I need to =
bind
> rows 31-40 of this dataview to my control (a asp.net repeater). Is =
there
> some way I can filter this DataView based on the index of the items, =
not
> anything specific to the data itself. Or perhaps there is a way to =
copy
> these rows to another view (Didn't look possible) I know I can create
> another datatable and add rows manually from the view, but that just =
seems
> like too much overhead when I'm so close.
>=20
> Any Ideas?
> --Michael
>=20
>