DataGrid Display

  • Thread starter Thread starter JSheble
  • Start date Start date
J

JSheble

What would be the best way to make change how the DataGrid displays data
based on the values of the dataset bound to it? I know I can create
DataGridTableStyles, but this really doesn't seem to be affected by the
data. For example, in the grid itself I have set alternating color to a
different color so alternating rows are different colors, but I want to add
a third color based on a field value of the dataset.

The dataset and the grid are programmtically created, not through the visual
design interface.
 
You need to catch individual cell and you can check the value for it.
depending on the value you can set the color for it. you can get
individual column through tablystyle and check individual cell value..

HTH
 
I'm assuming then that I have to loop through the datagrid in order to
accomplish this, but I can see no obvious way of looping through all the
rows of the datagrid... I also see no real events for such as when a new
row is added or anything else like that... How would I do this?
 
Back
Top