Sancler,
As always thanks. After I posted my question, I found that the cellEnter did what I need. Do you know of any documentation that shows event sequences for various objects?
Main Topics
Browse All TopicsI'm totally confused in using a bound DataGridView control. I have a Windows Form with a bound DataGrid View. I'm doing some testing with it because it doesn't seem to behave the way I would expect. I'm using the DataGridView1_RowEnter event. I've added a message box on the event that displays the dvg.rowcount, the currentrow.index, and isNewRow. THe dvg has two rows of data displayed and a blank new row (have set allow adds)
When I initially click on row 1, i get 3 rows, 0 index, IsNewRow = false. This is correcdt. then I click on row 2, I get 3 rows, 0 index, IsNewRow= false. This is not correct the index (I assume this is the row index should be 1). Then I click in the blank row at the end I get 3 rows, Index =1, IsNewRow = false (This is wrong, index should be 2 and IsNewRow should be true). BUT THEN I click on the first row again and I get rows = 3, Index = 2, IsNewRow = true (this is wrong, Index should be 0, IsNewRow should be false).
It appears that the index property is set to the expected value before the row is entered. OK the code should fire before the event. Is there an event after row_enter that fires, that I can use?
Thanks for your help.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
>>
Do you know of any documentation that shows event sequences for various objects?
<<
Unfortunately, no. I seem to recall that, in a couple of places in the help files, I've seen lists for particular objects. But I'm afraid I can't now remember which those objects are or where the lists are ;-(
At a general level, however (although not much use in this particular case), there is a topic "Order of Events in Windows Forms". For VB.NET 2005, it's here
http://msdn.microsoft.com/
Roger
Business Accounts
Answer for Membership
by: SanclerPosted on 2008-05-08 at 12:23:29ID: 21527659
You want to use the e.RowIndex to get reports on the status of the row being entered because it does not become the .CurrentRow until after this sub has fired. See below.
Roger
Select allOpen in new window