I working with a grid and want to turn off all the Active/Selected Row Appearance Settings, I want the Active/Selected Row to look just like the rest of the grid. When the user clicks on a cell in the grid, I do not want there to be any appearance change. I have tried adjusting the all the properties under the following settings with no effect other than being about to change the text color, the background gradient has stayed:
1. ActiveCellAppearance
2. ActiveRowAppearance
3. ActiveRowCellAppearance
4. SelectedCellAppearance
5. SelectedRowAppearance
I am using NetAdvantage for Windows Forms 2008 Vol. 1 Bundle.
You can set UseAppStyling on the grid to false.
Ok, I did not mention it being I did not think it would have an affect but I am using an AppStyling. If the AppStyling is what is preventing me from changing the ActiveRowAppearance, is there any way to turn it off for just one instance of a grid in the application while keeping it for all the rest of the Application?
No, these are two differnent properties and setting one does not affect the other. They both affect the resolution of the appearance of the row, though.
I'm afraid I don't know why resetting the ActiveRowAppearance didn't work, unless maybe you are loading a layout or using AppStyling.
I went in and modified the grid.DisplayLayout.Override.ActiveRowAppearance and ActiveCellAppearance for my application. When I tested it I was still getting the same results. When I used the immediate window to look at the value for grid.DisplayLayout.Override.ActiveRowAppearance and ActiveCellAppearance it shows the appearances being modified as I had done; but when I look at the grid.ActiveRow.Appearance it is different from the grid.DisplayLayout.Override.ActiveRowAppearance. Should not these be same? If not, where do I go in order to change grid.ActiveRow.Appearance?
By default, when you place a new grid on a form, the designer loads a preset which will set the ActiveCellAppearance and ActiveRowAppearance. So you should go into the property grid at design-time and reset the grid.DisplayLayout.Override.ActiveRowAppearance and ActiveCellAppearance.
If you don't want the user to be able to select rows, then you should set SelectTypeRow to None.