Hi,
i have one grid with the 4 fields as given below
[EC No.] [Firm Name] [Due Amt.] [Due Days.]
i want to allow sorting in each column in descending order...n want default sorting from Due Days fields....
suppose i want to sort grid from [Firm Name] field so it should sort data by that field
and suppose i want to sort grid by [Due Amt.] field so it should sort data by that field..vice versa
plz provide me code with example
thank you..
Amit ChoudharyPosted Mar 25, 2010, 5:51 AM
Client-Side Sorting and Paging
The GridView control provides you with the option of sorting and paging records without requiring a form-post back to the Web server. In other words, you can re-render the contents of a GridView when sorting and paging, without needing to re-render the entire page.
You enable client paging and sorting by assigning the value true to the EnableSortingAndPagingCallback property. When this property has the value true, the GridView uses JavaScript to request an updated set of records from the Web server.
The page in Listing 4 demonstrates how to use the EnableSortingAndPagingCallback property.
Using Callbacks when Sorting and Paging
The page in Listing 4 displays the current date and time, and the contents of the Titles database table. When you sort and page the records in the GridView, the time displayed by the page does not change. The time doesn't change because the page is not reloaded.
Behind the scenes, the GridView uses the Microsoft Internet Explorer XMLHTTPRequest object to communicate with the Web server. This object is supported by Internet Explorer version 5.0 and higher.
Please mark as answer if it helps.
Lalit MPosted Mar 25, 2010, 3:36 AM
Article-1 & Article-2 & Article-3...