We have recently upgraded from Infragistics 2011.1 to 2014.1 and detected an issue with calling Clear() on UltraListView.Items - a NullReferenceException gets thrown at: Infragistics.Win.UltraWinListView.UltraListViewItem.get_TextSizeIconic().
There was previously no issue in that code before. Is this a known but or has something changed in that code?
Thank you for contacting Infragistics Support.
I have investigated your issue, and found it to be a known issue. This issue was logged in our internal tracking system with Development ID 182922. So I’ve created a case for you CAS-145249-Q3C7W5 and will update you for the progress of this issue via the mentioned case. You could reach your case following the link below:
Thank you for using Infragistics Components.
Thanks so much for a quick reply! :)
We will await the fix in the next few weeks. In the meantime - is there any workaround for this that we could use?
Thank you for your feedback.
What you can do is before call Clear() method on the UltraListView.Items collection to suspend the layout and set the UltraListView View property to Details. After call Clear you can set back View property and resume the layout. You can do it this way:
private void ButtonClearData_Click(object sender, EventArgs e)
UltraListViewStyle currentStyle = this.ultraListView1.View;
this.ultraListView1.View = UltraListViewStyle.Details;
this.ultraListView1.View = currentStyle;
Please find attached a sample solution implementing this approach.
Please let me know if this is what you are looking for or if I am missing something.
Wondering if this was ever resolved? Or did it resurface. I'm still getting this error in 17.1. The workaround still works though.
Working properly in 18.1.20181.177
The issue that this thread was originally created for and development issue 182922 was logged for where a NullReferenceException is thrown when calling Clear on the UltraListView.Items collection was resolved and is not reproducible in 18.1.20181.177.
The call stack that Michael provided is different from the original issue and if that is what you are seeing, we need a sample to look into what is happening.