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
230
Implement custom DateTime grid editor control
posted

Hi,

I am working to support Thai language. The main problem is the UltraDateTimeEditor does not support to show Thai year correctly (Thai year = normal year + 543). I have made a custom control by combining UltraMaskedEdit, UltraMonthViewMulti. And it works fine.

The problem now is the editor for the cell in the grid. I cannot figure out how to make a custom editor similar like the one above. I tried to create a class to inherit from UltraMaskedEdit, then add the ButtonsRight and UltraMonthViewMulti but I always get this exception

Message: The Owner specified a type to EditorWithMask that is not supported by the editor.

StackTrace Information
*********************************************
   at Infragistics.Win.UltraWinMaskedEdit.MaskInfo..ctor(EditorWithMask maskEditor, EmbeddableEditorOwnerBase owner, Object ownerContext)
   at Infragistics.Win.EditorWithMaskEmbeddableUIElement.SyncOwnerInfo(Boolean forceRegetValueFromOwner)
   at Infragistics.Win.EditorWithMaskEmbeddableUIElement.SyncOwnerInfo()
   at Infragistics.Win.EditorWithMaskEmbeddableUIElement.OnBeforeDraw()
   at Infragistics.Win.EditorWithMaskEmbeddableUIElement.PositionChildElements()
   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UltraWinGrid.RowColRegionIntersectionUIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UltraWinGrid.DataAreaUIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UltraWinGrid.UltraGridUIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive)
   at Infragistics.Win.ControlUIElementBase.VerifyIfElementsChanged(Boolean verify, Boolean syncMouseEntered)
   at Infragistics.Win.ControlUIElementBase.VerifyIfElementsChanged(Boolean verify)
   at Infragistics.Win.ControlUIElementBase.ProcessMouseMoveHelper(Object sender, MouseEventArgs e)
   at Infragistics.Win.ControlUIElementBase.ProcessMouseMove(Object sender, MouseEventArgs e)
   at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
   at Infragistics.Win.UltraControlBase.OnMouseMove(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseMove(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Can someone show me the correct way to do a custom editor for a grid?

Parents Reply Children
No Data