Sorting Dataset Rows

  • Thread starter Thread starter Slonocode
  • Start date Start date
S

Slonocode

I have a form with some textboxes, checkboxes, and comboboxes that are
databound to the "Packages" table in a dataset.

For Example:
Me.txtFirstName.DataBindings.Add(New Binding("Text", DS,
"Packages.FirstName"))

and I navigate with statements like:
Me.BindingContext(Me.DS, "Packages").Position += 1

I use the data in the dataset to send an xml request to another program
which sends a reply. I read the reply and update the "Packages" table.


At this point I would like to be able to sort the rows in the dataset based
on data in a column that was returned from the other program.

I have read about the dataview but everything seems to be related to the
datagrid.
I haven't seen where I can bind to a dataview in the manner above.

Any suggestions?

Thanks
Slonocode
 
Hi Slonocode,

The dataview is absolute not releated to the datagrid.

I type it in here so watch typos or small errros.

dim dv as new dataview(DS.packages) 'I use always (DS.tables("packages")
dv.sort = "FirstName")
Me.txtFirstName.DataBindings.Add(New Binding("Text", dv, "FirstName"))

I hope this answer your question?

Cor
 
Back
Top