Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid / DataTable Behavior

Status
Not open for further replies.

keyser456

IS-IT--Management
Nov 21, 2003
73
US
A row is "added" to the DataTable after I type in some info into a cell and then call EndCurrentEdit on the DataGrid. Spiffy. However, the DataTable.Rows.Count still shows 0. When I trap the RowChanged event (which fires right after calling EndCurrentEdit) I get the following information:

e.Row.RowState == Added
e.Action == Add
e.Row.Table.Rows.Count == 0

However, once the RowChanged event is finished, all of a sudden NOW the datatable has a row Count = 1

Each time a new row is added, I need to do something with every row (including the newly added row), but I can't seem to access the new datarow through the DataTable until AFTER the RowChanged event has completely finished. Shouldn't the RowChanged event fire AFTER the row is actually part of the DataTable? After all, the RowState says Added.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top