Results 1 to 4 of 4

Thread: DataView Sort help!

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618

    DataView Sort help!

    I'm trying to sort a data table with a data view by a Int64 field. The result I am getting is sorted in chunks. Sort of like:

    625
    626
    627
    628
    9876301
    9876302
    9876303
    629
    630
    631

    Each "Chunk" is usually at least a couple hundred records, not just two or three. Anybody have anyt thoughts?

    Dim dvSortedView As DataView = New _
    DataView(m_Dataset.Tables("PMXVendorInfo_AL"))

    ' Sort the DataView by CG_VEND_NBR
    dvSortedView.Sort = "CG_VEND_NBR"
    Sean

    Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    VB Code:
    1. dvSortedView.Sort = "CG_VEND_NBR ASC"

    I would try explicitly setting ASC on the end.

    I assume you tried that though... in which case, this may be a bug.

  3. #3
    Member
    Join Date
    Jun 2004
    Location
    The Netherlands
    Posts
    37
    Are you somehow using a tablestyle for this dataview aswell?
    I had loads of troubles sorting a datagrid getting the weirdest results till I noticed that the sorting order in the tablestyle 'wins' from the sorting in the datagrid.
    I never set sorting options in the tablestyle, but it then assumes the default values, making changes in the datagrid have no influence at all.

    Hope it helps.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618
    I would try explicitly setting ASC on the end.
    Yeah, tried that. thanks though.

    Are you somehow using a tablestyle for this dataview aswell?
    I'm actually just pulling from an RDB Database, checking for changes, and trying to sort the results and shove them into a SQL Server table, so I don't have any datagrids or any visual components. (Actually, this is a done in a service). Thanks though.
    Sean

    Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width