Newbie datagrid help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the following code to update my datagrid in a win form that is the
front end to an Access DB.

Me.BindingContext(School11, "Student").AddNew()
OleDbDataAdapter1.Update(School11)

My question is how do I have the datagrid select the new record after it
updates?
 
If the row is getting added at the end and there is no sorting involved,
then you can simple select the last row of the datagrid after inserting
the new row using DataGrid.Select(int) method.

Or what you can do is after adding the record, find the index of that
record in the datatable and then set the CurrencyManager.Position
property to that..

Let me know if you need further help.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
 

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