DefaultEditorOwnerSettings editorSettings = null;
// Add an item for editing date. editorSettings = new DefaultEditorOwnerSettings( ); editorSettings.DataType = typeof( DateTime ); //editorSettings.MaskInput = "mm/dd/yyyy"; //editorSettings.MaskDataMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeBoth; editor = new DateTimeEditor( new DefaultEditorOwner( editorSettings ) ); editorsValueList.ValueListItems.Add( editor, "Date" ).Tag = editor;
int index = editorsValueList.FindStringExact( fieldType );
EmbeddableEditorBase editor = null; if (index >= 0) editor = (EmbeddableEditorBase)editorsValueList.ValueListItems[ index ].Tag; e.Row.Cells[ "Value" ].Editor = editor;
6/11/2010 : Object reference not set to an instance of an object. at Infragistics.Win.UltraWinMaskedEdit.EditInfo.MinValueForMask(Object minValue, String mask) at Infragistics.Win.UltraWinMaskedEdit.EditInfo.CalculateTrueMinValue() at Infragistics.Win.MonthDropDown.DoDropDown(EmbeddableUIElementBase element) at Infragistics.Win.DateTimeEditor.DoDropDown() at Infragistics.Win.EmbeddableEditorBase.DropDown() at Infragistics.Win.DateTimeEditorDropDownButtonUIElement.OnMouseDown(MouseEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement) at Infragistics.Win.ControlUIElementBase.ProcessMouseDownHelper(Object sender, MouseEventArgs e) at Infragistics.Win.ControlUIElementBase.ProcessMouseDown(Object sender, MouseEventArgs e) at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e) at Infragistics.Win.UltraControlBase.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(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)
ray023 said:Object reference not set to an instance of an object. at Infragistics.Win.UltraWinMaskedEdit.EditInfo.MinValueForMask(Object minValue, String mask) at Infragistics.Win.UltraWinMaskedEdit.EditInfo.CalculateTrueMinValue()