[Message Deleted]
C#
3
Posts
3
Posters
0
Views
1
Watching
-
Hi you have some options. 1) use the fields in your datagrid. Attention, this method might be slow. Just itterate throug your rows:
foreach (DataGridViewRow row in settingDataGridView.Rows) { runningtotal += decimal.Parse(row.Cells[columnIndex].ToString(); }
2) get the data from the data behind the DataGridViewdocumentlinebindingsource.EndEdit(); foreach (DataRow row in ds.DocumentLine.Select("documentId=" + documentId)) { if (row.RowState != DataRowState.Deleted) { ds.DocumentLineRow docLineRow = (ds.DocumentLineRow)row; ... runningtotal += row.documentLineTotal; } }
Hope this will help you.SSK. Anyone who says sunshine brings happiness has never danced in the rain.