Hi
I have different value based appearnce set in each coulmn in my grid. Now on selection of one
row I want to make the selected row appearance such that it appear as brighter color that is
there in each column. For example if one column has color green and another column has color Red then
on selection of a particular row the column that has backcolor green should appear as bright green and the color
that has back color red will appear as brighter Red. Currently active/selected row appearance is totally
overriding existing back color of the columns and become a light gray for the entire row.
Thanks in advance for any help in this.
I guess you could use ConditionalAppearances and also set the SelectedAppearance of the cell in InitializeRow.
If you are going to write the code to check for the same condition inside InitializeRow, anyway, it just seems cleaner to me to apply both the Appearance and the SelectedAppearance at the same time. That way you ensure that they are consistent.
But that's just a style choice on my part, I can't think of any real practical reason why you can't use both.
Thanks Mike for your response.
So if I have conditional appearance and also set selectedappearance in initalizerow event will this work?
Or I need to move my logic from designtime conditional appearance to runtime initializerow?
I don't think there is any way to do this with ConditionalAppearances.
If you were using the InitializeRow event to simply color the cells based on the value in code, then you could set the cell's SelectedAppearance along with the Appearance at the same time. So the cell.Appareance.BackColor could be red and the cell.SelectedAppearance.BackColor could be a brighter red.