Hi,
I developed an app using the wingrid (2011.1 and same problem on 2011.2). The app and the grid (including filtering) in the app is working fine.
When packing the application to a selfcontained exe everything is ok, but when you want to set a custom filter by clicking on the filter symbol and select custom the app crashes:
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Infragistics.Win.AppStyling.Runtime.InboxControlStyleSettings.OnComponentRoleStyleChanged(Boolean reset)
at Infragistics.Win.AppStyling.Runtime.InboxControlStyleSettings.OnComponentRoleStyleChanged()
at Infragistics.Win.AppStyling.Runtime.InboxControlStyleSettings.InitializeComponentRole(ComponentRole componentRole)
at Infragistics.Win.AppStyling.Runtime.InboxControlStyler.VerifyStyleSettingsComponentRole(InboxControlStyleSettings styleSettings)
at Infragistics.Win.AppStyling.Runtime.InboxControlStyler.System.ComponentModel.ISupportInitialize.EndInit()
at Infragistics.Win.UltraWinGrid.CustomRowFiltersControl.InitializeComponent()
at Infragistics.Win.UltraWinGrid.CustomRowFiltersControl..ctor(UltraGridBase owningGrid)
at Infragistics.Win.UltraWinGrid.CustomRowFiltersDialog..ctor(UltraGridBase ownerGrid)
at Infragistics.Win.UltraWinGrid.ColumnHeader.RowFilterDropDownOwner.ShowCustomFilterDialogHelper(ColumnFilter columnFilter, RowsCollection rows)
at Infragistics.Win.UltraWinGrid.ColumnHeader.RowFilterDropDownOwner.ProcessColumnFilterSelection(ColumnFilter origColumnFilter, RowsCollection rows, String text, Object dataValue)
at Infragistics.Win.UltraWinGrid.ColumnHeader.RowFilterDropDownOwner.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.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
****************************
My usage of ilmerge:
ilmerge /target:winexe /log:im.log /out:C:\Daten\VBTest\UltragridTest\UltragridTest\bin\Debug\vis\Ultragridtest.exe Ultragridtest.exe Infragistics2.Shared.v11.2.dll Infragistics2.Win.v11.2.dll Infragistics2.Win.UltraWinGrid.v11.2.dll Infragistics2.Win.Misc.v11.2.dll
When deploy the app without do an ilmerge, the app works fine.
Does have anyone an idea?
I'm not sure why ilmerge makes a difference, but this error message is not related to the UltraGrid at all. It appears to be related to the InboxControlStyler component. The custom filter dialog uses this in order to style the default dialog when the Misc assembly is not present. So this might be a problem with the merging of the Misc assembly or perhaps it's a bug in the way the grid is attempting to access it.
If it's the latter, then you might be able to work around the issue by simply referencing something in the Misc assembly just to make sure it's loaded into memory before you try to drop down the filter dialog.
Try putting code in the Form_Load or some other event that fires initially that references an UltraLabel or UltraButton and see if that makes any difference.You don't even need to keep the label around. Something like this should do it:
Infragistics.Win.Misc.UltraLabel label = new Infragistics.Win.Misc.UltraLabel();label.Dispose();
If that does not help (or even if it does), let me know and I will investigate further.
Hello,
Thanks for provided information. I was able to reproduce your issue. I already create a case for you with reference number CAS-86346-6QFBVK and I`ll provide you additional information through the case. Let me know if you have any questions.
Regards
Mike,
thank you for your response. I tried your workaround but didn't have any success. I also tried to put an addition ultralable and ultabutton on the form (they both were ok, but the custom filter still throw an exception).
As you can see Georgi opend a case for that.
Greetings
Erich