I've taken some of the sample styles provided with the AppStylist application and modified them to to work with our system. I'm trying to set an AlternateItem color for the GridRow and in doing so I've run across a few styles that do not allow the AlternateItem state to be styled. I can set the color, but it has no effect on the grid.
What could cause the AlternateItem to not be used in the style even though it is set?
I've included two of my style files where the style does not use the AlternateItem color in the GridRow.
Thanks!
Hello Cindy,I'm glad that you found my suggestion helpful and managed to resolve your issue.
Thank you for using Infragistics!
Best,Ivan Kitanov
Hi Ivan, Thank you for your detailed reply. That fixed my problem! I never would have figured that out on my own LOL.
Cindy
Hello Cindy,
The reason why in some themes the AlternateItemcolor of the row is not changing is because there is an image applied to the row as well as the BackColor of the cells is set to white, which results in the AlternateItem color to be applied only on the cell border like it is with the “Nautilus” or the “LucidDreams” styles.
I have found this post that provides very detailed information of how to apply the AlternateItem color to the grid rows of those themes that display the alternate row color only on their border. According to it you can fix this by setting the background image of the row to “None”, selecting the AlternateItem from “Other States” and setting a color for it as well as setting the BackColor of the GridCell UIRole to transparent.
I have prepared a small sample application, which consist of a UltraGrid and UltraComboEditor. The combo is used to change the styles for the grid to demonstrate the difference in the different themes. The “IG” and “Aero” themes change the background color of the alternate rows as expected, the “Nautilus” and “LucidDream” themes change only the border of the cells in the row. Since I couldn't find the custom style files that you attached I have included a custom theme called “CustomLucidDreams", which was made following the instructions made in the post I referenced above, which changes the background color of the alternate rows of the grid similar to the “IG” and “Aero” themes.
Please let me know if you have any questions.
Regards, Ivan Kitanov
CustomAppStylistAlternateRowColor.zip