Datagrid event on exit row

  • Thread starter Thread starter Marty U.
  • Start date Start date
M

Marty U.

Can someone tell me what the event is that is raised when you exit the
row of a datagrid. I need to sum a column and place the value in a
textbox each time a row is exited. This would also include if the user
returns to a previous row and re-edits the data. I am building an
invoice application and need to populate a totals text box showing the
sum of all items in the grid.

Any additional pointers will help also.

Thanks

Marty
 
You can try the itemchanged event on the currencymanager.

CurrencyManager cm = (CurrencyManager)
this.dataGrid1.BindingContext[this.dataGrid1.DataSource,
this.dataGrid1.DataMember];

cm.ItemChanged += new
ItemChangedEventHandler(cm_ItemChanged);

Or, you could use the DataTable.RowChanged event if your data source is a
DataTable.

===========================================
Clay Burch, .NET MVP

Visit www.syncfusion.com for the coolest tools
 
Back
Top