I have an ultragrid that is currently styled and I would like to highlight an error row by coloring the text red.
This is easily accomplished by using:
ultragrid.Rows[x].Appearance.ForeColor = Color.Red;
However when ever you select, make active, hot track the item the red text goes to the requisit style. Is it possible to do either of the following:
1) Access the individual state resources for a given row and hand it a resource
or
2) Give a row its own StyleSet?
In regards to #2 I see that there is a spot in ultragrid.Rows[x].Appearance.StyleLibraryName however this does not seem to have any affect.
Any help would be appreciated.
What version are you using? We added a whole bunch of support in the latest (2009.2) version of the grid to make this a lot easier. If you have the latest version, there is an ActiveAppearance and a SelectedApperance on each cell. So you could create an Appearance object and assign the same appearance to the row and also to the ActiveAppearance and SelectedAppearance on each cell within the row.
Using 2009.2, so we are getting really close here, I am doing everything with row selects so hadn't thought to look at the cell level.
So I can do the following:
ultragrid.Rows[x].Cells[y].ActiveAppearance = MyResource;
and that works great. Perfect actually.
However, I can not do the following:
ultragrid.Rows[x].Cells[y].Appearance = MyOtherResource;
I get the following compile error:
Error 1 Cannot implicitly convert type 'Infragistics.Win.AppearanceBase' to 'Infragistics.Win.Appearance'. An explicit conversion exists (are you missing a cast?)
I am sure there is a way to hand a cell a Resource, what am I missing?
Thanks!