Hi ,
We are running into an exception when using UltraGrid. Basically we have placed an drop drown in one of columns by changing its style to combo box. Once the selection of the combo box happens (trapped via cellchange event), we take the user to another screen in our UI. that the high level picture of what we are doing. we are seeing following exception coming from infragistics code.
If (e.Cell.Column.Index = 1) Then
If (e.Cell.Text.Equals("Create New Template")) Then
Dim apppath As String = System.AppDomain.CurrentDomain.BaseDirectory.ToString
apppath = apppath + "NewDocument.doc"
mailMergeTemplate.MMTPath = apppath
RaiseEvent EditMailMergeTemplate(Me, New EditTemplateEventArgs(mailMergeTemplate))
Exception Is:-
Object reference not set to an instance of an object. (Infragistics2.Win.v8.1)
------------------------------Program Location:
at Infragistics.Win.EditorWithCombo.Infragistics.Win.IValueListOwner.OnSelectionChangeCommitted() at Infragistics.Win.ValueList.ProcessSelectionChangeCommitted() at Infragistics.Win.ValueListDropDown.OnSelectionChangeCommitted() at Infragistics.Win.ValueListDropDown.SelectItemByMouse(ValueListItem valueListItem) at Infragistics.Win.ValueListDropDown.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at Infragistics.Win.ValueListDropDownUnsafe.WndProc(Message& message) 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 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[ commandLine) at SDP.Win.Application.My.MyApplication.Main(String[ Args)
Waiting your response,
Ngaheer
Well, if you want to try to work around the issue, what I would do is - don't call your code directly from the CellChange event. Instead, usea BeginInvoke to call a method that does what you want. That way, the CellChange event will be finished with whatever it needs to do before your code fires.