GridView, ObjectDataSource and SortDirection

C

codefragment

Hi
Theres a SortParameterName property that can be set to pass a sort
expression, what about
a sort direction? I need this info to do my select.
I tried hacking this by wiring into GridView.RowCreated and setting
the sortexpression for
the column with the sort direction but that triggers a FieldUpdate and
goes into a recursive loop.

How do I do this? The class thats set as the TypeName in the
ObjectDataSource could be tweaked
to find the GridView somehow but that seems messy?

Ta
 
B

Brock Allen

When ascending is requested the GridView will pass the SortExpression. When
descending is requested it will append " DESC" to the SortExpression value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top