Single Page Sorting

Discussion in 'ASP .Net' started by Stuart Ferguson, Oct 17, 2007.

  1. I am currently using a DataGrid to display a list of Top 20 Customer
    Accounts that are sorted by a sales value. These results are retrived
    from an ObjectDataSource

    From this list I want to sort the results by for example Customer Name,
    since I am only displaying the 1 page of data is it possible for this
    sort to be performed without the grid control rebinding to the database,
    or does the Grid need to rebind on every sort?

    Any Help would be most appreciated.

    Stuart

    *** Sent via Developersdex http://www.developersdex.com ***
     
    Stuart Ferguson, Oct 17, 2007
    #1
    1. Advertising

  2. Stuart Ferguson

    sloan Guest

    The way I did this is to ... cache the data ... which is the source of the
    ObjectDataSource.

    Then on the "Sort By Customer Name", I retrieve the cached data.
    I bind it to the ObjectDataSource.

    I don't have the code with me, but it took some tinkering.

    Why are you using a DataGrid in 2.0?
    Move up to the GridView, you'll be much happier.

    ...




    "Stuart Ferguson" <> wrote in message
    news:...
    >I am currently using a DataGrid to display a list of Top 20 Customer
    > Accounts that are sorted by a sales value. These results are retrived
    > from an ObjectDataSource
    >
    > From this list I want to sort the results by for example Customer Name,
    > since I am only displaying the 1 page of data is it possible for this
    > sort to be performed without the grid control rebinding to the database,
    > or does the Grid need to rebind on every sort?
    >
    > Any Help would be most appreciated.
    >
    > Stuart
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
     
    sloan, Oct 17, 2007
    #2
    1. Advertising

  3. Sorry i am not using the ASP.Net standard grid (data grid or gridview) i
    am using a custom grid control.

    *** Sent via Developersdex http://www.developersdex.com ***
     
    Stuart Ferguson, Oct 18, 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. Randall Parker
    Replies:
    1
    Views:
    608
    S. Justin Gengo
    Dec 12, 2005
  2. Chris
    Replies:
    1
    Views:
    13,649
    Oisin
    Mar 24, 2006
  3. chris brat
    Replies:
    1
    Views:
    644
    chris brat
    May 10, 2006
  4. Eric Layman
    Replies:
    3
    Views:
    630
    Rad [Visual C# MVP]
    Apr 14, 2007
  5. goodfella

    single producer, single consumer

    goodfella, Oct 6, 2009, in forum: C++
    Replies:
    41
    Views:
    1,934
    James Kanze
    Oct 12, 2009
Loading...

Share This Page