locate a desired row

W

wandii

Hi,
I have a datagrid attached to a datatable and upon inserting a new
record how can I move
the current postion to the inserted row. For example, I already have 3
records in datagrid
and first row is highlighted after adding a new row, 4th one, I would
like to move the row position to the 4th row.

I tried Datagrid.Rows.Find(newrow), select() no luck. Please let me
know if there is an easy way to do this.

Thanks in advance
 
D

diego

Hi wandii,

Try this:

bindingcontext(dGrid.datasource).position = dTable.rows.count-1

hth

Diego
 
W

wandii

Thank you Diego - worked really nice!

May I ask another question. When a user adds a new row and has not
saved it yet the existing rows state change to edit mode too. How can
I disable existing
row state to unchanged. Please let me know.

Thanks in advance.
 

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

Top