Sorting grid from collection

Discussion in 'ASP .Net' started by Jim Owen, Jul 2, 2003.

  1. Jim Owen

    Jim Owen Guest

    I'm binding a DataGrid to a class which I've inherited from CollectionBase.
    This works like a dream, simply by going:
    MyGrid.DataSource = MyCollectionClass;
    MyGrid.DataBind;

    However, I'm used to binding DataGrids to a DataView and then setting the
    DataView's Sort property to a sort string. How can I replicate this sorting
    functionality while using a CollectionBase instead of a DataView?

    --
    - Jim Owen
    206-501-6936
    Jim Owen, Jul 2, 2003
    #1
    1. Advertising

  2. Jim Owen

    Natty Gur Guest

    Hi,

    use other collection type that support sorting, arrayList for example.

    Natty Gur, CTO
    Dao2Com Ltd.
    28th Baruch Hirsch st. Bnei-Brak
    Israel , 51114

    Phone Numbers:
    Office: +972-(0)3-5786668
    Fax: +972-(0)3-5703475
    Mobile: +972-(0)58-888377

    Know the overall picture


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur, Jul 2, 2003
    #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. Dylan
    Replies:
    5
    Views:
    420
    Daniel T.
    Mar 22, 2005
  2. Pradeep
    Replies:
    2
    Views:
    680
    Patricia Shanahan
    Jan 24, 2007
  3. Øyvind Isaksen
    Replies:
    1
    Views:
    967
    Øyvind Isaksen
    May 18, 2007
  4. Replies:
    0
    Views:
    406
  5. gzinger

    How to bing a collection with sub-collection to grid

    gzinger, Jun 23, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    11
    Views:
    305
    Jeffrey Tan[MSFT]
    Jul 5, 2005
Loading...

Share This Page