Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Editor Control
posted

We use the UltraDateTimeEditor and we have our own overrides on this control and I was wondering to what extent the WinGrid uses the editor control.  We were hoping that by setting the editor control we would be able to save time re-doing validations in the grid's cell events and just let the editor control handle these validations that we already have done.

From what I understand so far, by setting the editor control it does not use the editor control's events.  If it is possible to let the editor control run its own events and overrides instead of using the grid cell events please let me know how.

 

Thanks!

Parents
No Data
Reply
  • 37774
    Suggested Answer
    posted

    It's not really possible to get the editor to run all of its events through the control when you put it in something like the grid.  The reason for this is that all of the editors run events and check their behavior through the Owner infrastructure, which is in this case the grid.  In your standalone control, the owner is the control itself, but when you assign the control as the EditorControl of a column, a clone of the editor is passed off to the column, initialized with the various default settings of the control.  You will need to interact with the grid's events in this case, possibly refactoring some of your code, since I don't think there's a way to create a derived owner; the grid uses an internal class as its EditorOwner.

    -Matt

Children