|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Cause GridView to be sorted from DropDownListHowdy All,
I have a GridView control on a page and I want to give the user the ability to sort using the colums or using a dropdown. Is there an easy way to tell the grid to sort based on a column? Or do I have to manually sort the datasource and rebind it to the grid? Thanks dbl Yes, sorting involves binding the grid with data in the sorted order.
Show quoteHide quote "DBLWizard" <ibflyfis***@yahoo.com> wrote in message news:1172194651.274459.157550@v33g2000cwv.googlegroups.com... > Howdy All, > > I have a GridView control on a page and I want to give the user the > ability to sort using the colums or using a dropdown. Is there an > easy way to tell the grid to sort based on a column? Or do I have to > manually sort the datasource and rebind it to the grid? > > Thanks > > dbl > Teemu,
My situation is that the grid has sorting turned on and sorting works fine. But my client also wants to be able to sort from a drop down. I was hoping that there was some event on the grid that I could call and pass the column that sorting is wanted on. What you are saying is that I will have to manually sort the datasource and then rebind? Show quoteHide quote On Feb 25, 1:20 pm, "Teemu Keiski" <jot***@aspalliance.com> wrote: > Yes, sorting involves binding the grid with data in the sorted order. > > -- > Teemu Keiski > AspInsider, ASP.NET MVPhttp://blogs.aspadvice.com/jotekehttp://teemukeiski.net > > "DBLWizard" <ibflyfis***@yahoo.com> wrote in message > > news:1172194651.274459.157550@v33g2000cwv.googlegroups.com... > > > > > Howdy All, > > > I have a GridView control on a page and I want to give the user the > > ability to sort using the colums or using a dropdown. Is there an > > easy way to tell the grid to sort based on a column? Or do I have to > > manually sort the datasource and rebind it to the grid? > > > Thanks > > > dbl- Hide quoted text - > > - Show quoted text -
Other interesting topics
access validation info in client script
Custom Server Control Loading webcontrols problem menu control StaticSelectedStyle Problem with javascript file in ASP Datagrid on WebPart: After postback Data is disappearing ASP:Menu control Dropdowns show above Main Menu Loading JavaScript files from a class library Managed control and security How to Disabled node in Treeview |
|||||||||||||||||||||||