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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top