Sort Direction in ObjectDataSource?

  • Thread starter Thread starter ASF
  • Start date Start date
A

ASF

Hey all,
In objectdatasource there is a property called sortExpression which is
used in many "custom sorting" applications. My question: is there a
sortDirection property? I can't seem to find a reference to one, but
otherwise, how does a gridview (for instance) know which direction to
sort by when default sorting is used?

Any links or comments are appreciated. Thanks
 
Hello ASF,

GridView has the SortDirection property for that
Look at that article where it describes in details http://aspnet.4guysfromrolla.com/articles/012308-1.aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


A> Hey all,
A> In objectdatasource there is a property called sortExpression which
A> is
A> used in many "custom sorting" applications. My question: is there a
A> sortDirection property? I can't seem to find a reference to one, but
A> otherwise, how does a gridview (for instance) know which direction to
A> sort by when default sorting is used?
A> Any links or comments are appreciated. Thanks
A>
 
Thanks for the response Michael. I read the article and it's update
version and I just want to ensure I'm totally clear on something. Am I
right in believing that the objectdatasource has properties to support
one-way sorting but NOT bi-directional sorting? I.E., there is no
sortdirection in objectdatasource?
 
Please disregard my previous post. Here's my real question. I just
completed this tutorial:

"Tutorial 26: Sorting Custom-Paged Data"
http://msdn2.microsoft.com/en-us/library/bb497937.aspx

And it leaves me confused. Bi-directional sorting is occurring at the
gridview level, and I see how a sortExpression is passed to the stored
procedure via the ODS and BLL, but I don't see how the gridview is
passing a sortdirection? HOW is bi-directional sorting occurring? I
would understand IF just the subset of records sent back from SQL
Server were sorted (just 10 records sorted) bi-directionally, but
that's not what's occurring. What am I missing here?
 
Back
Top