Hi,
I'm using an UltraWinGrid in which one the cells has the following style: Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList.
I apply the isl file I attached to this post to change the styling (I zipped the file because isl file could be added).
In the CellChange event handler of the grid, I call Grid.PerformAction(UltraGridAction.ExitEditMode) to update my datasource when a user click on a different value of the ValueList assigned to the cell.
After calling Grid.PerformAction(UltraGridAction.ExitEditMode), a style which doesn't match with any of the styles I defined in the isl (Normal, Selected, Active) is applied to the cell (seems to be a default style).
Do you have an idea what state is changed to when Grid.PerformAction(UltraGridAction.ExitEditMode) is called? Which state should I customize in AppStylist to override the default one I have at the moment?
It's tough to say without being able to see exactly what's happening. Can you post a small sample project that I use to see what it looks like when it gets into this state?
Typically, when you select an item from the ValueList, the cell would appear selected. But I'm not sure what effect exiting edit mode would have.
Hi Mike,
I attached a prototype to this post.
Here is the screenshot of the application:
There are a couple of things happening here.
First, the cell is picking up the ActiveCellAppearance ForeColor applied to the grid. So I removed the ActiveCell and ActiveRow appearances like so:
this.ultraGrid1.DisplayLayout.Override.ResetActiveRowAppearance(); this.ultraGrid1.DisplayLayout.Override.ResetActiveCellAppearance();
You could leave the ActiveRowAppearance if you like, but I removed it just for testing.
When I do this, the cell text turns green instead of black. The green is coming from the isl file on the GridCell UIRole's Active state in the isl file.
The only real puzzle here is why the grid's ActiveCellAppearance is taking precedence over the Active state on the GridCell role in the isl. That should not be happening, unless maybe you have your Isl file's resolution order set to up use the Control before the application.
My isl's resolution order is set up to ControlThenApplication. In my mind, the ActiveCellAppearance (if not overridden in the application after loading the isl) was heriting its style from the GridCell "Active" style defined in the isl. This seems not to be the case, because if I look at the fore color defined for the ActiveCellAppearance, it is set to black.
In order to fix my issue, I'm going to override the ActiveCellAppearance after loading the isl.
This works fine.
Let me know if that solution works for you.