Hello,
I have a WinGrid in one form that needs to select only the cell that I click on, not all the row related to that cell. I haven't been able to achieve that, so I'll ask for help: is this possible? How?
I think it should be something that controls that in the OverrideLayout of the grid, but I can't find it. Something like CellSelectionType = Row/Column/Cell or something like that.
Thanks in advance!
Hello Xe,
Thank you for contacting Infragistics Developer Support.
If you want to select a cell only when you click on it you could set the CellClickAction property to CellSelect. You can do that by using the following line:
ultraGrid1.DisplayLayout.Override.CellClickAction = CellClickAction.CellSelect;
Note that by doing that the row will still become the active row and the active row appearance will be applied to the whole row. So you might want to turn off active row appearances:
ultraGrid1.DisplayLayout.Override.ActiveAppearancesEnabled = DefaultableBoolean.False;
Let me know if you have any additional questions.
Yes, but with that I can't have ActiveAppearances active, and I need backcolor of some cells to be shown even when the cell is selected.
Thanks for the answer, anyway.
I am just checking about the progress of this issue. Let me know if you need my further assistance on this issue.
Thank you for using Infragistics Components.
Not really. Let me post an example, so I can be more clear.
This is an example of the grid:
As you can see, there are white cells and colored cells. This has been achieved dissablig the active appearances and putting these colors as images, and putting the SelectedRowAppearance to SandyBrown. The blue square is an image of a blue square inserted in a cell. My goal is to achieve this without putting images in the cells. I can set the active appearance of a cell the same backcolor as the cell appearance, and it works great when I select a single cell or row. But when I try to select multiple cells, like the example, it doesn't show the active appearance backcolors, it puts all cells to SandyBrown. Is it possible to do something like this using Backcolors and not images?
Thanks again.
It sounds to me that, in addition to setting the ActiveAppearance and the Appearance on the cell, you also need to set the SelectedAppearance.BackColor on the same cell, so that the cell always looks the same regardless of whether it is normal, active, or selected.
Perfect, that's what I wanted. Thanks!