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.
 

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

Back
Top