Sorting underlying data

Discussion in 'ASP .Net Datagrid Control' started by Björn Wandel, Feb 7, 2005.

  1. 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
     
    Björn Wandel, Feb 7, 2005
    #1
    1. Advertising

  2. Björn Wandel

    Elton Wang Guest

    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


    >-----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
    >
    >
    >.
    >
     
    Elton Wang, Feb 7, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGljaw==?=

    ObjectDataSource's underlying data/schema

    =?Utf-8?B?RGljaw==?=, Mar 1, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    1,792
    Steven Cheng[MSFT]
    Mar 1, 2006
  2. velthuijsen
    Replies:
    2
    Views:
    350
    velthuijsen
    Nov 18, 2004
  3. ruksan
    Replies:
    1
    Views:
    448
    Karl Heinz Buchegger
    Mar 8, 2005
  4. Curious Trigger
    Replies:
    4
    Views:
    7,269
    Curious Trigger
    Jul 24, 2006
  5. djc
    Replies:
    2
    Views:
    178
Loading...

Share This Page