Retrieving values from DataGrid row before they are changed

Discussion in 'ASP .Net Web Controls' started by greenb, Jul 5, 2005.

  1. greenb

    greenb Guest

    I have an editable datagrid and need to retrieve the values of the cells
    before they are changed. I tried to read the text values from the cells in
    the ItemCommand event and the OnEdit event but they are always empty strings.
    Does anyone know the best way to do this?

    All the other datagrid functionality is working correctly (edit, update,
    delete, and paging).

    Thanks for your help.
     
    greenb, Jul 5, 2005
    #1
    1. Advertising

  2. On the client side, if you can determine the id of the cell you are about to
    edit, you can use getElementById to determine the value before you edit it.
    The ASP:DataGrid doesn't have this functionality built in by default. A 3rd
    party grid would have a full client side object model that you can access
    (Infragistics, ComponentOne).

    On the server side, you would need to find the cell you are about to edit in
    the databound grid, not the eventargs that are being passed to your function.
    --
    Staff Consultant II
    Enterprise Web Services
    Cardinal Solutions Group

    Future Business Model
    Loan Origination Services
    National City Mortgage


    "greenb" wrote:

    > I have an editable datagrid and need to retrieve the values of the cells
    > before they are changed. I tried to read the text values from the cells in
    > the ItemCommand event and the OnEdit event but they are always empty strings.
    > Does anyone know the best way to do this?
    >
    > All the other datagrid functionality is working correctly (edit, update,
    > delete, and paging).
    >
    > Thanks for your help.
    >
    >
    >
    >
     
    Michael Baltic, Jul 6, 2005
    #2
    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. Mark Davidson
    Replies:
    0
    Views:
    438
    Mark Davidson
    Aug 11, 2003
  2. =?Utf-8?B?U3VyZXNo?=
    Replies:
    1
    Views:
    483
    Saravana
    Nov 22, 2004
  3. greenb

    Retrieving values from DataGrid row before update

    greenb, Jul 5, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    139
    greenb
    Jul 5, 2005
  4. Jon J.

    Retrieving changed TextBox values

    Jon J., Sep 16, 2004, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    173
    Michael
    Nov 9, 2004
  5. Andrus

    Insert new row before current row

    Andrus, Jun 29, 2003, in forum: Javascript
    Replies:
    0
    Views:
    119
    Andrus
    Jun 29, 2003
Loading...

Share This Page