>>
>>private void myDataGrid_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
>>{
>> myDataGrid.CurrentPageIndex = e.NewPageIndex;
>> doDataBind();
>>}
>>
Cetin
>How do you cause this event to fire?
>
>When the data view has more than 10 rows and sorted by a column, then when I get the next set, I would like to get the next set in the same order.
>
>How do you do the DataBinding from a Table or the default view of that table to get next set by the same order that the user has chosen?
Dawa,
Check this for a custom paging sample:
http://www.dotnetjunkies.com/Tutorial/EA868776-D71E-448A-BC23-B64B871F967F.dcikPS: It's not perfect but good. ie: Never use count() to get record count - with huge tables would be very slow. That info is stored in SQL server system tables (and whatever the backend is there should be a better place to get). Also check DataAdapter's Fill method. It's overloaded to specify startRow, numberOfRowsToreturn.
Cetin