Ask a Question related to ASP.NET General, Design and Development.
-
Paul Hobbs #1
DataGrid Custom Paging using SQLDataReader
Hi Everyone,
I am trying to implement a DataGrid that uses Custom paging, but the DataSource is a SQLDataReader, not a DataSet. I have seen examples that use the Fill method of a DataAdapter to only retrieve a page of data, eg:
daCustomers.Fill(dsCustomers, (PageNum - 1) * intPageSize, intPageSize, "Customers")
But I am having difficulties achieving this using a DataReader. My goal is to have a datagrid that only displays 10 rows of data at a time and allows the user to move between pages as well as allowing the user to sort the data - all without using a DataSet (not for any particular reason - I just want to do it this way)!
Cheers,
Paul
Paul Hobbs Guest
-
Odd paging problem in custom datagrid control
Hi there, I have made a custom datagrid control class. its pretty basic, just some styles changed and small things like that... the datagrid is... -
Custom Paging in datagrid
hi all, i have tried implementing custom paging using the example from 4 guys from rolla....however example doesnot work as desired.....i.e when... -
More problems with DataGrid Editing while using custom Paging
All, i am running into more problems with DataGrid, following are my doubts 1) When i scroll to the next page on the dataGrid using my custom... -
Datagrid custom paging problem
After tons of thinking I decided that a dataset for a search could contain far too much info on the server for an ISP to allow, so I decided to do... -
Problem with "Custom paging" of DataGrid control
I created a page to show RealEstate Data with images retrived from the MSSQL 2000. I am using a DataGrid control: <asp:datagrid... -
Chuck Haeberle #2
Re: DataGrid Custom Paging using SQLDataReader
You are attempting to use a DataReader in a way for which it is not intended. DataReaders are for one time forward only reading of data out of a database. You can't "page" a DataReader because you can't go backwards.
Stick to the DataSet or a DataView based on a DataTable.
"Paul Hobbs" <paul@mobius.net.au> wrote in message news:uemH6mfUDHA.3308@tk2msftngp13.phx.gbl...
Hi Everyone,
I am trying to implement a DataGrid that uses Custom paging, but the DataSource is a SQLDataReader, not a DataSet. I have seen examples that use the Fill method of a DataAdapter to only retrieve a page of data, eg:
daCustomers.Fill(dsCustomers, (PageNum - 1) * intPageSize, intPageSize, "Customers")
But I am having difficulties achieving this using a DataReader. My goal is to have a datagrid that only displays 10 rows of data at a time and allows the user to move between pages as well as allowing the user to sort the data - all without using a DataSet (not for any particular reason - I just want to do it this way)!
Cheers,
Paul
Chuck Haeberle Guest



Reply With Quote

