|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Sorting problem in Data grid controlDear Folks,
I am sorting the records in the data grid control. on click of the header hyper link the record gets sorted. but if i move to the next page, it shows the unsorted second page; how can i get rid of this. Thanx in advance. Regards, -- S.Sundararajan You need to "remember" which column was last sorted. Personally I like to
use ViewState for this sort of thing, so that once you leave the page and go to some other page the column data is gone (as it's not needed anymore). You can also use Session, but it becomes clumsy, IMO. For ViewState, just access it directly on your page (just as you would Session). ViewState["SortColumn"] = "SomeColumnName"; -Brock DevelopMentor http://staff.develop.com/ballen Show quoteHide quote > Dear Folks, > > I am sorting the records in the data grid control. on click of the > header hyper link the record gets sorted. but if i move to the next > page, it shows the unsorted second page; how can i get rid of this. > > Thanx in advance. > > Regards, >
Other interesting topics
IE Web Controls - discontinued ???
custom validator and button events Re: At which life cycle should EnsureChildControls() be called? Dynamically resize a DropDownList in a grid when dropped down How to call javascript when click update command(it Edit command c Cant Render Page Control with Visual Studio 2005 Beta Control Template set dropdownlist value in datalist Custom Templated Control not rendering asp.net controls correctly Enter Key form with many UserControls |
|||||||||||||||||||||||