Link to home
Start Free TrialLog in
Avatar of Paulagier
PaulagierFlag for France

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.
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Try...RowCreated or RowBound event.  <<dont hv anything to test.. :(>>

e.Row.RowIndex will give the index of the newly added row.
Avatar of Paulagier

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
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial