EditCommandColumn - how to know if user changed data...

J

John Walker

Hi,
When the user clicks 'update' how do I know if any of the text in the
textboxes on that row have been changed by the user, and subsequently will
need to be updated back to the database?

Thanks,
John
 
E

Elton W

Hi John,

In UpdateCommand event, e.Item refers to current edit item
(row) of datagrid.

It is not important to know the text content had been
changed or not. For example, you can update database in
both cases. If it is changed, you just update database
with new content, otherwise it makes no change to
database.

HTH

Elton Wang
(e-mail address removed)
 
J

John Walker

Elton,
Thanks, I'll do that. I thought that I would do updates only when
necessary, but if your way is the common way, then I'll go with that practice.

Thanks,
John
 
J

John Walker

Sorry, I just realized that that will not work because I need to update a
date/time field with the date and time that the field was updated with new
data. So, it turns out that I will need to know when data has changed. Is
there a way to do that?
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top