I have a Column in UltrawinEditor with UltraTextEditor with buttons added to ButtonsRight Collection.
I need keep the ability to click the button, but the text of the cell doesn't be able to get selected. Now I have the CellActivation = Activation.ActivateOnly, I can click the buttons, I can't edit the text, but the text can get focus and get selected changing its appearance.
The only solution which I found was create two columns, one for Text and the other for Buttons, but I don't like that trick, and it changes the look of the grid.
Thank you for your help.
Hello Marwa,
Thank you for posting in our forum.
If I understand you correctly you need to be able to click the editor buttons while the cell is not in edit mode. Actually this is not possible as editor buttons get clickable only when the cell is in edit mode. As a workaround you may use MouseEnterElement and MouseLeaveElement events. In these events you can check if the mouse is enter/leave the button of the editor. If so when mouse enters you can set the CellActivation to AllowEdit. When mouse leave the button set back the CellActivation to NoEdit as well as force the cell to exit edit mode. More about MouseEnterElement and MouseLeaveElement event you may find by following the next link http://help.infragistics.com/Help/Doc/WinForms/2014.2/CLR4.0/HTML/Win_Mouse_Handling.html
Please note this approach will allow the user to edit the cell via the keyboard. To prevent this you can handle KeyDown event and force the cell to exit edit mode.
Attached I am sending you small sample solution implementing this approach. Please check my sample and let me know if you need any further assistance.
Other approach you may consider is add the button via CreationFilter. Please check this forum thread where similar issue were discussed http://www.infragistics.com/community/forums/t/80843.aspx
Please let me know if you have any further questions.
Thank you for using Infragistics Controls.
Thank you very much for your help, and for the example...it was really helpful. It is a turnaround but it help me to achieve my goal.
Thank you