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


L

Learner

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
 
Ad

Advertisements

R

Raghavendra T V

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
 

Top