URGENT : Sorting a DataSet

Rohit_Saksena

Member
Joined
Mar 3, 2005
Messages
14
Programming Experience
3-5
Hi All,
I am in trouble and would like to get your help.

Actually for my project I have to write a member function of a class, to this function an integer value will be passed which will act as a position in a dataset. This dataset is a member of the same class for which I am writing the function.

In this function prior to accessing the record using the value passed it is required to sort the dataset. Sorting the dataset is only possible through dataview which should be bound to a control. As this class will be located at the Business Logic server it is impossible to include a control like Datagrid.

So is it possible to still use the dataview without binding it to a control and accessing its values.

Kindly reply asap, I am heavily relying on your solutions.

Thanking you.
Sincerely Your's
Rohit Saksena
 
Hmm...is it possible to grab the rows from the dataview and add them to a new datatable? I don't have time to test it, but as soon as I do I will.

_milo
 
Last edited:
You can definately create a dataView without binding it to anything.
Dim dv as DataView = New DataView(TableName)
dv.Sort = "some sort expression"
dv.Filter = "fieldname = something"
SomeVariable = dv.Item(0)
 
Back
Top