Persistent and Bidirectional Sorting In ASP.NET DataGrid(dotnetbips.com)

submitted by skuvskuv(40) 6 years, 2 months ago

If you have work with sorting feature of ASP.NET DataGrid, you must have noticed that the sorting works only for the current page of the grid. As soon as you change the 'state' of the page the sorting is lost (For example when page index is changed). This is because the value of SortExpression is available only in SortCommand event. In order to persist the sorting we need to preserve this value some where. In addition to this we do not have in-built mechanism to perform bidirectional (ascending-descending) sorting. In this small article I will show you how to accomplish these tasks using ViewState object.

1 comment |category: |Views: 5

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by gavinjoycegavinjoyce(25.7k) 6 years, 2 months ago 0

Wow, I haven't read an article that uses the .NET framework 1 beta in years.

Reply

information Login or create an account to comment on this story