<DataRowView> VERSUS <DataRowView.Row>

  • Thread starter Thread starter [tridy]
  • Start date Start date
T

[tridy]

Does anyone know why while working with drv (DataRowView)


a) if I uses this:
--------------------------------------------------------------------
drv.Row.Item("CODE") = 254
--------------------------------------------------------------------
would always make the row state "Modified"


b) if I uses this:
--------------------------------------------------------------------
drv.Item("CODE") = 254
--------------------------------------------------------------------
will sometimes keep the row "Unchanged"


====================================================================
Just to make clear, I do not call .ApplyChanges anywhere and I do not
run the a) and b) lines one after each other. I use them in the same
loop separately and they do sometimes produce different results.
Assigning the value to the DataRowView will always fail to change
the state of the row to the "Modified" if the row is the first in the
DataView. However if I use drv.Row to assign the value, it would change
the state of the row to "Modified".

does anyone have a clue why is it so?

Genadij
 
Hi,

Perhaps somebody called BeginEdit method?
Try calling EndEdit on DataRowView.
 
Thank you very much
that indeed solved the problem.

the grid was pointing to that row and
that's why it kept it in edit mode.

regards

Genadij
 
Back
Top