Two way sorting in GridView using Object Data Source

R

Ram

Hi All,

I am using Object Data Source to bind data in the gridview. I have
set the property AllowSorting=true. While running the application, I
could sort the data only in ascending order. Is there any way to
achieve two way sorting in gridview ie. both ascending and descending
on successive clicks ?.

Please give me a suggestion to solve this issue. Thanks in advance.


Expecting u'r answers,

S.Ramalingam
 
P

PeterKellner

Hi All,

I am using Object Data Source to bind data in the gridview. I have
set the property AllowSorting=true. While running the application, I
could sort the data only in ascending order. Is there any way to
achieve two way sorting in gridview ie. both ascending and descending
on successive clicks ?.

Please give me a suggestion to solve this issue. Thanks in advance.


Expecting u'r answers,

S.Ramalingam

Yes you can. Take a look at the ObjectDataSource I develop in my
article at the following post. (on MSDN also) It shows how to use ODS
for both directions of sorting. It's got an example and explanation.

Very powerful!

http://peterkellner.net/?p=24
Peter Kellner
http://peterkellner.net
 

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,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top