I am having a difficult time fixing a bug in my application. When I select an infragistics UltraDateTimeEditor an exception is thrown:
ArgumentNullException was unhandled -
EnterEditMode requires a embeddableElement parameterParameter name: embeddableElement
I can't figure out what this exception means so I can't find a way to fix it.
Hello,
It is hard to say what is causing this without any details. Can you tell what is your scenario, what are you doing to get this exception?
There are a lot of different reasons for this. Posting a small sample which reproduces the issue would be even better.
Thanks for the reply. Unfortunately it would be fairly difficult to create a sample that could reproduce the issue as the code is rather complicated, I'll first try my best to explain - I'm not confident that my explanation will help though as it's kind of strange.
I have a form that has this control and a datagridview. The datagridview has an editable column.
The bug can ONLY be reproduced with the following steps:
I click the UltraDateTimeEditor and change the date, I then must double click the DataGridView to edit a column.
There is an event in the UltraDateTimeEditor - Validated event.
When the validated event fires it makes a call to the back end to populate data in a dataset (call it DS1).
the DataGridView is bound to this DS1.
There is also a CellContentClick event for the dataGridView; however, the exception is thrown at the Validated event stage... during the backend call.
If this is not helpful I will try to create a code sample to reproduce the error.
It couldn't hurt to post the call stack of the exception. It's a long shot, and a sample demonstrating the exception is still the best and most reliable way for us to figure out what's happening. But it might point you in the right direction.
Here is the call stack, is this what you mean?:
PASport.exe!PASport.Common.ExecutionMVC.ExecutionModel.Open(object sender = {PASport.Forms.Insurance.Certificate, Text: Certificates}, PASport.Forms.Base.Modal.ModalForm modal = {PASport.Forms.Insurance.AddEditCertificate, Text: Edit Certificate}) Line 1285 C# PASport.exe!PASport.Common.ExecutionMVC.ExecutionController.RequestOpen(object sender = {PASport.Forms.Insurance.Certificate, Text: Certificates}, PASport.Forms.Base.Modal.ModalForm modal = {PASport.Forms.Insurance.AddEditCertificate, Text: Edit Certificate}) Line 300 + 0x19 bytes C# PASport.exe!PASport.Forms.Insurance.Certificate.RequestTopEdit() Line 482 + 0x1b bytes C# PASport.exe!PASport.Forms.Base.TwoGrids.TopBottomPersistentForm.dgmTop_EditCheckedChanged(object sender = {PASport.CustomControl.Menu.DataGridViewMenu, Name: dgmTop, Items: 12}, PASport.CustomControl.Menu.RowEventArgs ea = {PASport.CustomControl.Menu.RowEventArgs}) Line 828 + 0xb bytes C# PASport.CustomControl.Menu.dll!PASport.CustomControl.Menu.DataGridViewMenu.OnEditCheckedChanged(System.EventArgs e = {System.EventArgs}) Line 271 + 0x35 bytes C# PASport.CustomControl.Menu.dll!PASport.CustomControl.Menu.DataGridViewMenu.tsbEdit_CheckedChanged(object sender = {Edit}, System.EventArgs e = {System.EventArgs}) Line 173 + 0xe bytes C# [External Code] PASport.CustomControl.Menu.dll!PASport.CustomControl.Menu.DataGridViewMenu.EditChecked.set(bool value = true) Line 790 + 0x14 bytes C# PASport.exe!PASport.Forms.Base.TwoGrids.TopBottomPersistentForm.dgvTopPersistent_CellDoubleClick(object sender = {System.Windows.Forms.DataGridView}, System.Windows.Forms.DataGridViewCellEventArgs e = {System.Windows.Forms.DataGridViewCellEventArgs}) Line 629 + 0x15 bytes C# [External Code] PASport.exe!PASport.Common.Program.Main(string[] args = {string[0]}) Line 209 + 0x8 bytes C# [External Code]
Apologies, I just realized I posted the call stack. Here is the stack trace:
at Infragistics.Win.EmbeddableEditorBase.EnterEditMode(EmbeddableUIElementBase embeddableElement) at Infragistics.Win.UltraDataGridView.UltraEditorButtonColumnBase.PrepareForEdit(Boolean selectAll, UltraDataGridViewCell cell) at Infragistics.Win.UltraDataGridView.UltraDataGridViewCell.System.Windows.Forms.IDataGridViewEditingCell.PrepareEditingCellForEdit(Boolean selectAll) at System.Windows.Forms.DataGridView.BeginEditInternal(Boolean selectAll) at System.Windows.Forms.DataGridView.SetCurrentCellAddressCore(Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick) at System.Windows.Forms.DataGridView.OnCellMouseDown(HitTestInfo hti, Boolean isShiftDown, Boolean isControlDown) at System.Windows.Forms.DataGridView.OnCellMouseDown(DataGridViewCellMouseEventArgs e) at System.Windows.Forms.DataGridView.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.DataGridView.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(ApplicationContext context) at PASport.Common.Program.Main(String[] args) in C:\dotnet\PASportDev 1.x.x\PASport\Common\Program.cs:line 209 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel) at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly() at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData) at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext) at System.Activator.CreateInstance(ActivationContext activationContext) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
Hi,
Is that the whole call stack? Because I don't see any mention of the Infragistics components or controls in it anywhere.