Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting a DataSet
Message
From
23/10/2003 12:51:38
 
 
To
23/10/2003 12:46:05
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
00841585
Message ID:
00841672
Views:
28
This message has been marked as a message which has helped to the initial question of the thread.
Michel,

Your problem is this:
   ldDate = loView.Table.Rows(lnCompteur)("StartDate")

' What you should be using is this:

   ldDate = loView(lnCompteur).Row("StartDate")
~~Bonnie

>After having converted the rest of my code to take care of reading from the view instead of the DataSet, I face the situation that even after the view has been sorted that the display is not sorted at all but simply in the same order as the DataSet.
>
>Here's the code:
>
>
>' Get it into a view
>Dim loView As DataView
>loView = loData.Tables("Temp").DefaultView
>
>' Sort it
>loView.Sort = "StartDate"
>
>' Display the user group meetings
>lcHtml = ""
>
>For lnCompteur = 0 To loView.Count - 1 Step lnCompteur + 1
>   ldDate = loView.Table.Rows(lnCompteur)("StartDate")
>
>   lcHtml = lcHtml + "<B><A HREF=" + loView.Table.Rows(lnCompteur)("Url") + ">" + _
>    loView.Table.Rows(lnCompteur)("Title") + "</A></B>"
>   lcHtml = lcHtml + " "
>   lcHtml = lcHtml + "<FONT COLOR=GREEN>" + ldDate.ToString("MMMM dd, yyyy") + "</FONT>"
>   lcHtml = lcHtml + "<BR>"
>   lcHtml = lcHtml + loView.Table.Rows(lnCompteur)("Message")
>   lcHtml = lcHtml + "<P>"
>Next
>ConferenceVFP.Text = lcHtml
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform