DataGrid Display

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.
 
D

Deep Silent Ocean

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
 
J

JSheble

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?
 

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

Top