By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,524 Members | 1,589 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,524 IT Pros & Developers. It's quick & easy.

Sorting Dataviews

P: n/a
I have a dataview setup like this:
DataView.Table = dataset.Tables(0)

DataView.Table.Columns.Add("Sequence", System.Type.GetType("System.Int16"))

Dim count As Integer

For count = 0 To dataset.Tables(0).Rows.Count - 1

DataView.Table.Rows(count)("Sequence") = count

Next
later I do:
DataView.Sort = "Sequence"

& loop though the Rows. If I interfere with loading the sequence column it
dosnt sort.

Later on I might want to swap 2 rows by changing their sequence. Again the
dataview does not sort. The helptext implies no particular restrictions I
can see & I dont see any warnings or errors generated.

In addition I am holding the dataview as a session variable. Will that break
anything ?

Does anyone have any ideas ?

--
Jonathan Bailey.
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
<jb> wrote in message news:41**********************@news.easynet.co.uk.. .
I have a dataview setup like this:
DataView.Table = dataset.Tables(0)

DataView.Table.Columns.Add("Sequence", System.Type.GetType("System.Int16"))
Dim count As Integer

For count = 0 To dataset.Tables(0).Rows.Count - 1

DataView.Table.Rows(count)("Sequence") = count

Next
later I do:
DataView.Sort = "Sequence"

& loop though the Rows. If I interfere with loading the sequence column it
dosnt sort.

Later on I might want to swap 2 rows by changing their sequence. Again the
dataview does not sort. The helptext implies no particular restrictions I
can see & I dont see any warnings or errors generated.

In addition I am holding the dataview as a session variable. Will that break anything ?

Does anyone have any ideas ?

--
Jonathan Bailey.


OK I'm a dork !! I was using DataView.Table.Rows(x) to get the data back not
DataView.Item (x) o DataView(x) since item is the default.
--
Jonathan Bailey.
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.