Paulagier
asked on
detecting the added row index in a datagridview
I am using a Datagridview control on a winform and a bindingsource for data. Data is filled in bindingsource and accordingly datagridview is populated, one row at a time.
I want to perform some operations over the added row. I tried with RowsAdded event but e.RowIndex is not being retrieved properly.
I am looking for an event or something like that which will fire up when a row from bindingsource is added to the datagridviewand give me the index of the added row.
I want to perform some operations over the added row. I tried with RowsAdded event but e.RowIndex is not being retrieved properly.
I am looking for an event or something like that which will fire up when a row from bindingsource is added to the datagridviewand give me the index of the added row.
ASKER
It seems to me that RowsCreated event does not exists under WidowsForm . The equivalent is RowAdded and i have already tested it. The problem is that, sometimes, if there is more thanone row added this event just fire once
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
e.Row.RowIndex will give the index of the newly added row.