Hi Experts, I have one user control in which I have registered some events like KeyDown, OnLeave etc. If I use my user control on normal win form then it is working fine ( events are firing properly) but if I use it in ultra grid as editor component then events which are registered in user control are not firings. Is there any way to fire those events?
Thanks & Regards,Ganesh
The control's events are not supposed to fire for the editor provided to the grid, because the control is not being manipulated by the user, the cell is. I can't think of a reason why you would want the control's events to fire when the user is in edit mode on a cell in the grid, but it is possible that you just have to refactor the code in the control's event handlers such that you can execute the same code in response to cell events like CellChange and AfterExitEditMode.
Actually My user control contains UltraText editor with some editor buttons , based on text change of text editor I am doing some validation. If I use my usercontrol in normal form then those events of ultra text editors are firing but if I use it as Editor Component then its not firing. Is there anyway to fire that?
--Thanks,Ganesh
ganesdpatil said:I am setting my user control as EditorComponent of Grid column.
The EditorComponent property only accepts components which implement IProvidesEmbeddableEditor. Are you implementing this interface on your usercontrol? If not, then what you are describing here is not possible.
ganesdpatil said: Is there any possibility that internally it is considering TextEditor which is present in my UserControl as EditorComponent?
The only way that could happen is if you are implementing IProvidesEmbeddableEditor and passing off the interface method calls to the UltraTextEditor.
Hi Mike, Thanks for reply. I am setting my user control as EditorComponent of Grid column. If it use copy of my UserControl then also it has to work fine. Is there any possibility that internally it is considering TextEditor which is present in my UserControl as EditorComponent? Do I need to implement any Interface to work it fine? Currently I am setting my UserControl which is inherited from UserControl class as a Editor controller. Or is it OK?
Hi Ganesh,
I'm a little confused.
Are you embedding your UserControl in the grid? If so, I assume you are using the UltraControlContainerEditor. If that's the case, then this should have no effect on the events of the controls inside the UserControl, so I don't know why that's not working for you.
Or are you simply setting the EditorComponent of the grid column to the UltraTextEditor which happens to be inside a UserControl. If that's the case, then the UserControl is irrelevant. The grid does not use the control (the UltraTextEditor) that is on your UserControl or on a form. The UltraTextEditor provides a copy of it's internal editor to the grid. So the events on the UltraTextEditor will not fire when the user makes changes in the grid and that is the correct behavior. You will have to use a grid event.