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

Discussion in 'ASP .Net Datagrid Control' started by John Walker, May 11, 2005.

  1. John Walker

    John Walker Guest

    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
    John Walker, May 11, 2005
    #1
    1. Advertising

  2. John Walker

    Elton W Guest

    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



    >-----Original Message-----
    >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
    >
    >.
    >
    Elton W, May 11, 2005
    #2
    1. Advertising

  3. John Walker

    John Walker Guest

    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

    "Elton W" wrote:

    > 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
    >
    >
    >
    > >-----Original Message-----
    > >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
    > >
    > >.
    > >

    >
    John Walker, May 12, 2005
    #3
  4. John Walker

    John Walker Guest

    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?

    "Elton W" wrote:

    > 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
    >
    >
    >
    > >-----Original Message-----
    > >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
    > >
    > >.
    > >

    >
    John Walker, May 13, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Qm9uag==?=

    Data grid EditCommandColumn

    =?Utf-8?B?Qm9uag==?=, Oct 27, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    4,624
  2. Replies:
    1
    Views:
    671
    Rosanne
    Oct 11, 2005
  3. Replies:
    0
    Views:
    420
  4. Andries

    I know, I know, I don't know

    Andries, Apr 23, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    220
    Gregory Toomey
    Apr 23, 2004
  5. mxbrunet
    Replies:
    1
    Views:
    202
Loading...

Share This Page