Cause GridView to be sorted from DropDownList

Discussion in 'ASP .Net Web Controls' started by DBLWizard, Feb 23, 2007.

  1. DBLWizard

    DBLWizard Guest

    Howdy All,

    I have a GridView control on a page and I want to give the user the
    ability to sort using the colums or using a dropdown. Is there an
    easy way to tell the grid to sort based on a column? Or do I have to
    manually sort the datasource and rebind it to the grid?

    Thanks

    dbl
     
    DBLWizard, Feb 23, 2007
    #1
    1. Advertising

  2. DBLWizard

    Teemu Keiski Guest

    Yes, sorting involves binding the grid with data in the sorted order.

    --
    Teemu Keiski
    AspInsider, ASP.NET MVP
    http://blogs.aspadvice.com/joteke
    http://teemukeiski.net



    "DBLWizard" <> wrote in message
    news:...
    > Howdy All,
    >
    > I have a GridView control on a page and I want to give the user the
    > ability to sort using the colums or using a dropdown. Is there an
    > easy way to tell the grid to sort based on a column? Or do I have to
    > manually sort the datasource and rebind it to the grid?
    >
    > Thanks
    >
    > dbl
    >
     
    Teemu Keiski, Feb 25, 2007
    #2
    1. Advertising

  3. DBLWizard

    DBLWizard Guest

    Teemu,

    My situation is that the grid has sorting turned on and sorting works
    fine. But my client also wants to be able to sort from a drop down.
    I was hoping that there was some event on the grid that I could call
    and pass the column that sorting is wanted on.

    What you are saying is that I will have to manually sort the
    datasource and then rebind?

    On Feb 25, 1:20 pm, "Teemu Keiski" <> wrote:
    > Yes, sorting involves binding the grid with data in the sorted order.
    >
    > --
    > Teemu Keiski
    > AspInsider, ASP.NET MVPhttp://blogs.aspadvice.com/jotekehttp://teemukeiski.net
    >
    > "DBLWizard" <> wrote in message
    >
    > news:...
    >
    >
    >
    > > Howdy All,

    >
    > > I have a GridView control on a page and I want to give the user the
    > > ability to sort using the colums or using a dropdown. Is there an
    > > easy way to tell the grid to sort based on a column? Or do I have to
    > > manually sort the datasource and rebind it to the grid?

    >
    > > Thanks

    >
    > > dbl- Hide quoted text -

    >
    > - Show quoted text -
     
    DBLWizard, Feb 26, 2007
    #3
    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. sloan
    Replies:
    0
    Views:
    325
    sloan
    Feb 6, 2007
  2. Replies:
    0
    Views:
    464
  3. JimLad
    Replies:
    0
    Views:
    386
    JimLad
    Jul 16, 2010
  4. Tony Girgenti

    Gridview header sorted column dimmed after selecting it

    Tony Girgenti, Mar 21, 2007, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    770
    Tony Girgenti
    Mar 21, 2007
  5. Tony Girgenti

    Gridview header sorted column dimmed after selecting it

    Tony Girgenti, Mar 13, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    142
    Tony Girgenti
    Mar 13, 2007
Loading...

Share This Page