Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting
Message
From
20/05/2002 11:31:31
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Sorting
Miscellaneous
Thread ID:
00658912
Message ID:
00658912
Views:
48
can anyone tell me why this code does not load my list box with data sorted by the field intSequence?
' Added code for sorting the data
      Me.gdsDataSet.Tables("RouteStops").Select(Nothing, _
                  "intSequence ASC", DataViewRowState.CurrentRows)
' End code for sorting

Me.lstRouteSegments.Columns.Add("Sequence", 80, HorizontalAlignment.Left)
Me.lstRouteSegments.Columns.Add("Location", 300, HorizontalAlignment.Left)
Me.lstRouteSegments.Columns.Add("ID", 80, HorizontalAlignment.Left)

For liCount = 0 To Me.gdsDataSet.Tables("RouteStops").Rows.Count - 1

    Me.gdrRow = Me.gdsDataSet.Tables("RouteStops").Rows.Item(liCount)
    lcListViewString = Me.gdrRow("strLocationDescription").ToString
    liListViewIndex = Me.gdrRow(lstrIDName).ToString
    liIntSequence = Me.gdrRow("intSequence").ToString


    ' Set the view to show details.
    Me.lstRouteSegments.View = View.Details
    ' Select the item and subitems when selection is made.
    Me.lstRouteSegments.FullRowSelect = True
    ' Display grid lines.
    Me.lstRouteSegments.GridLines = True
    Me.lstRouteSegments.AutoArrange = False

    ' Create the items.
    Dim item1 As New ListViewItem(liIntSequence, 0)
    item1.SubItems.Add(lcListViewString)
    item1.SubItems.Add(liListViewIndex)

    'Add the items to the ListView.
    Me.lstRouteSegments.Items.AddRange(New ListViewItem() {item1})
Next
Randy Belcher
AFG Industries, Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform