Hi everyone,
I am wondering if anyone can point me in the right direction toward highlighting a single cell when it is clicked in an UltraGrid. Right now it highlights the entire row. I have looked at the CellClickAction property, but none of the options to set it to get it to behave this way. The closest thing is CellSelect, however the row remains highlighted.
Thanks
Dave
The row is probably highlight, not because it is selected, but because it is the active row. Go to the property grid at design time and look at grid.DisplayLayout.Override. Reset both the ActiveRowAppearance and the ActiveCellAppearance properties to get rid of the active row highlighting.
Hi tniec,
Thanks for your response. Unfortunately setting the Row.Activition to disabled, disables the entire row, despite changing the cell's Activation property.
You are correct as far as the behavior I am looking for. I tried to get this by changing some settings in the Appearance Browser. I changed the BackColor of the Active Row to white and then the BackColor of an active cell to the Highlight color. For some reason, this causes the Forecolor (Text in the cells) to also turn white.
I tried to get around this by settting the ForeColor property , however some of my columns have blue underlined text (to simulate a hyperlink) and some have black text. If I set the ForeColor property to black, they hyperlinks turn black when a corresponding cell in the row is selected. If I set the ForeColor to blue, the text I need to turn black turns blue. I've also tried chaning the colors in different events (BeforeCellActivate, AfterCellActivate), but the settings from the Appearance Browser seem to take precedence.
Its not 100% clear what behavior you want. You might need to explain it in more detail.
However, there is a good chance that by altering the ".Activation" property on the row and maybe on the cell you will get the behavior you want.
For example, the default (I think) for a row is to activate the entire row if you click on any cell in it. That might be a "bigger" selection than you want if you just want one cell highlighted. In that case change the row activation to "disabled" and they change the cell activation to "AllowEdit". I think that may give you what you want.