tags:

views:

102

answers:

2

Hello,

Can an ObjectDataSource have multiple SortExpression's?

Thanks, XaiSoft

+2  A: 

Well, you can have only 1 sort expression at any given time, but you can sort on multiple fields:

.Sort = "column1 asc, column2 asc"

WebMatrix
If possible, could you provide an example. Thanks!
Xaisoft
I really wish I could find documentation indicating what order I should apply those sort parameters. I guess I'll just try, 50% chance of being right.
Frank Schwieterman
A: 

This might not directly answer your question I tend to do all presorting on my physical objects before binding them to anything taking advantage of List<>.Sort or LINQ .OrderBy other than that I will leave all sorting up to the client side like using JQuery to sort the physical html table.

Chris Marisic
Do you have an example of how you would sort an asp:ListBox with an asp:Drodown using JQuery.
Xaisoft
Like what would be in the drop down, ascending/descending or something else?
Chris Marisic