Hi,
I have an application which has one of the default application styles enabled ie. "Office2007Silver.isl".
In the past, if I wanted to disable the active row highlighing I would set the ActiveRowAppearance.BackColor to Transparent and apply a "NoFocusRect" drawfilter to remove the active row borders.
However, these methods don't work with the app styling enabled. How do I go about removing the highlighting? Thanks
Ryan
Yes, the new feature was added in v9.2.You can turn off active and selected appearance or even the selected ForeColor and BackColor individually.
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { e.Layout.Override.ActiveAppearancesEnabled = DefaultableBoolean.False; e.Layout.Override.SelectedAppearancesEnabled = DefaultableBoolean.False; e.Layout.DefaultSelectedBackColor = Color.Empty; e.Layout.DefaultSelectedForeColor = Color.Empty; }
Mike,
Is this property available in v 9.2? I am having similar problem and don;t want to change the isl.
Hi Ryan,
You still have to do it in the isl.
What you do is remove the styling from the GridRow UIRole's Active state. Then you create a new StyleSet inside the isl which is based on the original one and add the styling to the grid row back in.
Then, in your application, you can set the StyleSetName on the grid's that you want to pick up the active row styling to the new styleset that has it.
I think we will be adding a new feature to the grid in v9.2 to let you do this via a property setting on the grid so this will be easier in the future. But using StyleSets is the best way to do it right now.
Thanks Mike for the usual speedy reply. However, I don't want to make the change globally, just for certain grids within my application. Is there a way to override the highlighting settings after a style has been applied?
Thanks
You have to remove them from the application stle library.
Open up the isl file in AppStylist. Go to the grid tab and mouse over a grid row. You will get a tooltip which lists the various roles that apply to the row. One of them will be GridRow. Press teh number on your keyboard for that role and it will bring you to the UI role properties.
Then you can clear the settings for that UI Role and save the isl.