Datagrid event on exit row

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
 
C

ClayB [Syncfusion]

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
 

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