DataSet / DataTable / Row selection

  • Thread starter Thread starter Sébastien
  • Start date Start date
S

Sébastien

Hi,

Does someone could tell me an easy way to select the last row added in a
DataTable inside a DataSet ?

Something like :
DataSet.Table(myTable).SelectLastRowAdded ()

Thank you.
 
Hi Sebastian,

Normaly

dataset.tables("myTable").rows(dataset.tables("myTable").rows.count-1)

I hope this was what you did mean?

Cor
 
I want to do somthing like :

BindingContext(DataSet, TableName).Position = LastRowAdded
 
Hi Sebastian,

Than it is in my opinion
\\
CType(BindingContext(ds.Tables(0)),
CurrencyManager).position=ds.Tables(0).rows.count-1
//
I hope that was the solution?

Cor
 
I'll try it, but I don't think it will be the real solution since I use a
DataViewManager to sort my list (so the new row I add could be somewhere
else that on the last line).

But I'll try to set the bindingcontaxt of my DataSet instead
DataSet.DefaultViewManager and see if it works.

Thank you for your help.
 
Back
Top