I use data binding to control the datagrid, which connect to database table directly, what I want to do now is to implement the pager function on the datagrid, which I can only load 20 records from Database into memory, and display them. What do I know now is the the data binding will load all the records into database and then do some filtering and display in the control.. any suggestion ?
views:
115answers:
2
A:
You need to load 20 records at a time in your data source, i.e. you have to implement paging yourself. Each time the user requests a new page, you read the new set of records.
On the SQL side, 'sql paging' will get you lots of results from your favorite search engine and here is an example.
Timores
2010-03-01 14:39:50
A:
Basicaly you have to run your datagrid in virtual mode, tell the grid how many rows there are in your recordset and then react to the CellValueNeeded-event. We implemented caching follwing this example on msdn .
Stephan Keller
2010-03-02 08:27:48