Conditional formating

W

Willem

Hi,

I'm working with a datagrid whithout any problem. But now
I like to use some condinional formating to one of the
columns. If the value in column 3 > 10 then change the
back color to red instead of green. Is there a way to do
this.

Thanks,

Willem
 
E

Eliyahu Goldin

Willem,

In code behind in PreRender event loop through the grid data rows. For every
row check value of column 3 and set formatting properties of another column.

Eliyahu
 
N

Nuno Fonseca

try to use the event item databound and in there check if the value of your
column is bigger then 10

something like this:

if ((int)e.Item.Cells[1].Text>10)
{
//want you want to do
}
 

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

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top