How to set a cell's property?(DataGrid)

  • Thread starter Thread starter NewSun
  • Start date Start date
N

NewSun

I want to change a cell's backclor according to the value of the cell.
e.g.
the value of the cell color
=0 blue
< 0 green


What should i do?

Thx in advance.
 
NewSun,

You can't do this with the datagrid as it is. You will have to create a
column that derives from DataGridColumnStyle and then have it paint the cell
a certain color based on other criteria. For the DataGrid, the rendering of
the cells is handled on the column level, which makes it difficult to do
this sort of thing.

Hope this helps.
 
Back
Top