Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Sorting underlying data

Reply
Thread Tools

Sorting underlying data

 
 
Björn Wandel
Guest
Posts: n/a
 
      02-07-2005
Hello all.

I'm sort of a newbe on asp.net. It is common in web apps to show a table of
items of some sort to the user. Some columns contain links to pages where
the user can edit that particular item.

My problem is this: How do you sort on the underlying data (in a dataview),
and not on the complete html text?

This HTML code illustrates the problem. In this case the sorting (ASC) is
done correctly:

<a href="b">Value A</a>
<a href="a">Value B</a>

But when i sort this column (ASC), the order is ofcourse reversed since the
sorting is not done on the underlying data. Any ideas?

Regards,
Björn


 
Reply With Quote
 
 
 
 
Elton Wang
Guest
Posts: n/a
 
      02-07-2005
Hi Björn,

Suppose you want to sort fieldA (ASC), fieldC (DESC),
you can do it

dataview.Sort = "fieldA ASC, fieldC DESC";

HTH,

Elton Wang
http://www.velocityreviews.com/forums/(E-Mail Removed)

>-----Original Message-----
>Hello all.
>
>I'm sort of a newbe on asp.net. It is common in web apps

to show a table of
>items of some sort to the user. Some columns contain

links to pages where
>the user can edit that particular item.
>
>My problem is this: How do you sort on the underlying

data (in a dataview),
>and not on the complete html text?
>
>This HTML code illustrates the problem. In this case the

sorting (ASC) is
>done correctly:
>
><a href="b">Value A</a>
><a href="a">Value B</a>
>
>But when i sort this column (ASC), the order is ofcourse

reversed since the
>sorting is not done on the underlying data. Any ideas?
>
>Regards,
>Björn
>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get more data from a gridview's underlying datasource? Curious Trigger ASP .Net 4 07-24-2006 06:17 PM
ObjectDataSource's underlying data/schema =?Utf-8?B?RGljaw==?= ASP .Net 2 03-01-2006 08:26 AM
How to do MFC code change when a field type in the underlying data base is changed ruksan C++ 1 03-08-2005 09:53 AM
how to get to the underlying data in a datagrid control? djc ASP .Net Datagrid Control 2 12-17-2004 02:11 PM
How do I use two different class interfaces to the same underlying data? velthuijsen C++ 2 11-18-2004 08:03 AM



Advertisments