Hi,
when moving the mouse pointer across a xamGrid I need to retrieve the column beneath the mouse pointer. I found a post explaining how to get the row beneath using a style on CellsPanel and setting an event setter for the MouseEnter event. But I can't figur out how to retrieve the key of the column (TextColumn).
Thanks for any help.
Stephan
Hello Stephan,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Hello Stefan,
sorry, I didn't have the time to try yout solution. Though I'm sure that I tried to set an eventsetter for CellControl but then got an error, something like "can't convert eventsetter to setter" as I recall.Well, I'll try it again tomorrow.
Should your solution work in Version 2013.2 as well?
Thank you for your reply. I am very glad that my suggestion was helpful for you. Please let me know if I can assist you with anything else.
Sincerely,
Krasimir, MCPD
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
Hello Krasimir,
that makes sense. Now I've got all parts together. Thank you very much for your support.
Hello Stephen,
Thank you for your reply and the clarification. The reason for the EventSetter to not get applied is that the style for the CellControl is not applied to the cells of the XamGrid. When the Conditional Formatting feature of the XamGrid is enabled, the XamGrids replaces the CellControls with ConditionalFormattingCellControls and the style for the CellControl does not apply, since there are not CellControls in the grid. You can change the TargetType of the Style to ConditionalFormattingCellControl and the event should get triggered. I have modified the sample that I have sent with my previous reply to show this change.
Please let me know if I can assist you with anything else.
Hello Stefan and Krasimir,
I finally found the reason why using an event setter on CellControl doesn't work. As soon as I set AllowConditionalFormatting="True" on xamGrid the event won't fire. After setting AllowConditionalFormatting="False" the event fires again.
So is there any chance to get the event fired with AllowConditionalFormatting="True". If not: what other possibilities do I hav to format single cells depending on their content?
Thank you for your quick responses
Thank you for your post. I have modified the sample that Stefan has provided you with to use version 13.2.
Please let me know if you need any further assistance on the matter.