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
400
lost custom editor behavior when embedded in grids
posted

I have a DateTimePicker that inherits from UltraMaskedEdit. It has some custom code that catches keystrokes (by overriding ProcessCmdKey) to allow greater flexibility in entering datetimes. For example, being able to type over existing characters without selecting any text.

 But when I embed it by setting it as a column's EditorControl or ((Infragistics.Win.IProvidesEmbeddableEditor)myDateTimePicker).Editor as the column's Editor, I lose this behavior. Moving to code to an ((Infragistics.Win.IProvidesEmbeddableEditor)myDateTimePicker).Editor.KeyDown event handler doesn't seem to work either. Is there some way to keep the key processing behavior without resorting to duplicating the key processing code at the grid level?

 --yale

Parents
  • 280
    posted

    move your code to:

    Infragistics.Win.EditorWithMask ed =((Infragistics.Win.IProvidesEmbeddableEditor)this.ultraMaskedEdit1).Editor as Infragistics.Win.EditorWithMask;

    ed.KeyDown

    Hope that helped

    Nassos

Reply Children