Hi,
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?
Thanks!
Hi again,
Thanks so much! We'll use this workaround for now, until getting a fix in the next Infragistics update.
Hello Rostislav,
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.SuspendLayout();
this.ultraListView1.View = UltraListViewStyle.Details;
this.ultraListView1.Items.Clear();
this.ultraListView1.View = currentStyle;
this.ResumeLayout();
}
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.
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?
Thanks again,
Ross
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:
https://ko.infragistics.com/my-account/support-activity
Thank you for using Infragistics Components.