Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Sort Direction in ObjectDataSource?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ASF - 04 Mar 2008 22:23 GMT
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
Michael Nemtsev [MVP] - 04 Mar 2008 23:01 GMT
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>
ASF - 05 Mar 2008 15:25 GMT
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?

> Hello ASF,
>
[quoted text clipped - 17 lines]
> A> Any links or comments are appreciated. Thanks
> A>
ASF - 05 Mar 2008 15:35 GMT
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?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.