Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Programming Languages
.NET
DataView sorting
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Leeb65, post: 3663002, member: 52070"] Hi all, I am trying to sort a dataView, but the data is still in the original order. My code is below: Random rnd = new Random(); Links.ReadXml(Server.MapPath("Links.xml")); Links.Tables[0].Columns.Add(new DataColumn("RandNum")); for (int i = 0; i < Links.Tables[0].Rows.Count; i++) { Links.Tables[0].Rows[i]["RandNum"] = rnd.Next(10000); } DataView linksView = Links.Tables[0].DefaultView; linksView.Sort = "RandNum"; I iterrate through the Dataview and all the data is in the original order. Can anyone please help me with this? Thank you in advance, Lee[/i] [/QUOTE]
Verification
Post reply
Forums
Programming Languages
.NET
DataView sorting
Top