<DataRowView> VERSUS <DataRowView.Row>

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
 
M

Miha Markic [MVP C#]

Hi,

Perhaps somebody called BeginEdit method?
Try calling EndEdit on DataRowView.
 
T

[tridy]

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
 

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