How to change the color of the modified fields in a Datagrid?

Discussion in 'ASP .Net Datagrid Control' started by Learner, Aug 26, 2004.

  1. Learner

    Learner Guest

    I have a situation where in a user would like to see all the modified
    fields font red in color when a record has been updated in a Datagrid.



    Here is the situation:
    We use popup windows to updated a record.

    I have a datagrid and in each row of the grid I have a small update
    icon at the end and by clicking on that icon a popup window appears
    with all the fields of that row and I can make changes to the current
    record and click on Submit. And when I click the Submit button on the
    popup window it is closed and the parent window that has the datagrid
    on gets refreshed and i can see the updated record displayed in the
    datagrid. But i need to display the modified fields font red in color.
    I fine with the remaining functionality except displaying the
    modified fields red in color. Can some one help me in doing this? I am
    just wondering if we have any property of the grid cell that remembers
    the previous value and fires an event when changes its value or any
    mechanism like that?

    thanks
    D
     
    Learner, Aug 26, 2004
    #1
    1. Advertising

  2. Hi,

    I am not sure wether this really works.
    what you can do is have 2 datasets .
    1 for original and 2nd one for modified values .
    Just before u pop up the windows you can create the dataset with original
    values and after updating create 2nd dataset.

    and just before you bind the Dataset to Datagrid check both the dataset for
    each and every cell before bind and if they match ignore it
    otherwise change the color of the cell.
    I guess you can you use DataGridOnItemDataBound even for this.

    Hope you get some idea from this.

    Thanks
    Raghavendra

    "Learner" <> wrote in message
    news:...
    > I have a situation where in a user would like to see all the modified
    > fields font red in color when a record has been updated in a Datagrid.
    >
    >
    >
    > Here is the situation:
    > We use popup windows to updated a record.
    >
    > I have a datagrid and in each row of the grid I have a small update
    > icon at the end and by clicking on that icon a popup window appears
    > with all the fields of that row and I can make changes to the current
    > record and click on Submit. And when I click the Submit button on the
    > popup window it is closed and the parent window that has the datagrid
    > on gets refreshed and i can see the updated record displayed in the
    > datagrid. But i need to display the modified fields font red in color.
    > I fine with the remaining functionality except displaying the
    > modified fields red in color. Can some one help me in doing this? I am
    > just wondering if we have any property of the grid cell that remembers
    > the previous value and fires an event when changes its value or any
    > mechanism like that?
    >
    > thanks
    > D
     
    Raghavendra T V, Aug 27, 2004
    #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. Matt Adams
    Replies:
    0
    Views:
    898
    Matt Adams
    Aug 26, 2003
  2. Replies:
    1
    Views:
    743
    Alan Krueger
    Sep 11, 2006
  3. Kamaljeet Saini
    Replies:
    0
    Views:
    447
    Kamaljeet Saini
    Feb 13, 2009
  4. Replies:
    7
    Views:
    389
    Mick White
    Feb 2, 2005
  5. apparker
    Replies:
    10
    Views:
    382
    apparker
    Apr 3, 2007
Loading...

Share This Page