Results 1 to 2 of 2

Thread: ordering numbers in dataset

  1. #1

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729

    ordering numbers in dataset

    i am trying to put a thing in .net and i need to put my dataset's rows ASC by number(actually its file sizes that i have in my xml database)

    the problem is:
    9629958
    9630232
    96959
    9904379
    9948434
    as you can see it is not ordering them well as he is doing alphabetic ordering and not numeric..how can i do it so it doesnt have this"bug"?
    \m/\m/

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Try something like this :
    VB Code:
    1. Dim intr() As Integer = {1, 3, 6, 2, 4}
    2.         MessageBox.Show("This shows the order before using Sort Method : " _
    3.         & intr(0) & intr(1) & intr(2) & intr(3) & intr(4))
    4.  
    5.         intr.Sort(intr)
    6.         MessageBox.Show("Now it's order numarically : " _
    7.         & intr(0) & intr(1) & intr(2) & intr(3) & intr(4))

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