I'm trying to change the background color of the selected rows in a 9.2 Infragistics WinGrid. Our grid is set to SelectRow when a cell is clicked. In the AppStylist I've attempted to set every back color on both the gridcell and gridrow items but the BackColor remains gray. Is there some property or something I'm missing? Please help. Thanks in advance.
Thank you so much. I was not familiar enough with the styles to even think that a resource image might be applied to it. I removed the resource and now my changes are actually applied. Thanks.
ecarrish said:We didn't specifically set the BackColor to gray ourselves, that's just what it has always been. As far as I can tell it does not appear to be the system color, the system color for a selected item is the standard blue with white text.
The default selected color for the grid (or any control) is the system highlight color. So if your system highlight color is blue and the row shows up gray, then something is changing it.When I load your isl file, I get gray selected rows, so it's clearly something in the isl.
So I loaded up your isl into AppStylist and moused over a row in the grid and then pushed number key 1 to see if anything is applied to the Selected State of the GridCell role. There was nothing there.
Then I tried #2 for the GridRow role and I could immediately see that the Selected state was in bold, so something is applied to it. When I opened up this state, I can see that there is a resource applied to this state called "GridRow_Selected" which has a background image on it.
We didn't specifically set the BackColor to gray ourselves, that's just what it has always been. As far as I can tell it does not appear to be the system color, the system color for a selected item is the standard blue with white text.
The row(s) are getting selected, we can iterate through the selectedrows property of the grid and see them.
We've attempted to Change the Cell, GridCell, Row and GridRow roles and then literally every state within those roles. Yet no affect.
The GridRow role's Selected state was what we believed would be the proper state. However, all it does is change basically a border around the row, leaving cells actually still colored gray. We aren't setting the color in the code and using the AppStylist we see the same results so I would think that that proves it's not our code setting it.
I'm thinking it's most likely something in the .isl file so I'm attaching it to see if that helps.
Why is the BackColor gray? Is that your Window color on your system? Or is that the system highlight color?
Are you sure that the row is actually getting selected?
Which UIRoles have you tried setting and which states?
For Selected Rows, you should probably use the GridRow role's Selected State. Perhaps GridCell's Selected state is also set in your isl and so the cell appearance is overriding the row. Or maybe you are setting the appearance of the cells in code?