I am attempting to override the appStylist theme setting for the Active UltraGridRow. Even if I False UseOSThemes, and False UseAppStyling I can not override the Active UltraGridRow Appearance. The purpouse is to provide a visual to the user that will indicate when an object is selected or not. This functionality works fine once the AfterSelectChange event is fired, i.e. activate a new row. I need to change the appearance of the active row itself. For instance if I click once on a row it should activate with the themed appearance. If I click on that row once more it should change the apperance of the active row.
Here's a simple example of one way I have tried.
Row.Appearance.BackGradientStyle = GradientStyle.GlassBottom37Bright;
Row.Appearance.BackColorAlpha = Alpha.Opaque;
Row.Appearance.ForeColor = Color.Black;
I have found the reason that prevented me from gaining my aim. I turned off row styles in AppStyler application. Than I assigned appropriate styles to cells. And as a result my cells have appearance and I can highlight them manually.
Thank you, Mike!
I think that it was a mistake to write here. I had to open a new topic.
I have no problems with an active row. I have a problems with overriding of settings in isl file.
And since we began to discuss it here, I think it makes sense to continue it here.
I have a grid. Grid has styles for grid rows and cells. You said that if I want to change some properties by myself I should turn them off in styles and then change manually. And also you said (in some other thread) that cell appearance is more important than row appearance.
I had reset cell properties. But it didn't help. I have the same problem - I cannot highlight editable cells.
if (cell.Column.CellClickAction == CellClickAction.Edit) { cell.Appearance.BackColor = Color.LightYellow; }
When appstyling is turned off - all works fine.
What can be wrong?
Hi Yuri,
I don't understand. You said that you do NOT want the active row in the grid highlighted and now you are saying that you do need it to be highlighted. Which is it?
I'm not suggesting that you turn off all styling your entire application. I'm saying you go into the isl file using AppStylist and remove the Active state from the UltraGridRow Role.
If you have some grids you want to have highlight the active row and other that do not, then you could use Stylesets for this. What you would do is create a base styleset (or use the exiting one in the isl) and remove the settings you don't want. Then you create a new StyleSet and set it's BasedOn field to the original StyleSet and add in the active row highlighting. Then in your application, any grid you want to have active row highlighting on, you set the StyleSetName to the styleset that has the highlighting.
Another option is set to ActiveAppearancesEnabled on the grid to false.
You have infinite flexibility here, so I'm sure you can achieve what you want.
But I need these styles. I use cell's background colors throughout all my program in all of my grids. And there are some grids with editable cells, whose color has to be changed.
Mike, is there is only option in my situation - to delete the styles from the isl file?
You will need to modify the isl file and remove those style settings that you don't want.