preCharge Forums - View Single Post - HOW TO: Using sorting / paging on GridView w/o a DataSourceControl DataSource
View Single Post
Old 07-08-2006   #2 (permalink)
agaba175
Banned User
 
Join Date: Jul 2006
Location: India
Age: 30
Posts: 105
Default Sorting and Paging in DATAGRID

Hi,

For Paging you need to set the AllowPaging property of datagrid, and for sorting you need the AllowSorting property of datagrid. You can also set the page style to display the paging in different number of styles like <> or in page number etc. Only setting the allowpaging property will not complete your task for paging. For make it running you need to write a single line of code in the code behind file on the datagrid's PageIndexChanged event.
DataGrid1.CurrentPageIndex =e.NewPageIndex this will make it working.

Cheers,
Amit
agaba175 is offline   Reply With Quote

 
Bankruptcy | Payday Loans | Debt Consolidation | Florida Flag | File Host