However, I'm using the Winforms Syncfusion library. When I set my SfComboBox's data source to an empty ObservableCollection, and then add an item to the ObservableCollection, there is an uncaught exception thrown. I tried updating Syncfusion.SfListView.WinForms and Syncfusion.Shared.Base to the latest version (22.214.171.124) through Nuget but that didn't resolve the issue.
Here is the relevant part stack trace:
at System.ThrowHelper.ThrowArgumentOutOfRange_IndexException() at Syncfusion.WinForms.ListView.LinearLayout.GetVisibleRectBelowRow(Int32 rowIndex) at Syncfusion.WinForms.ListView.LinearLayout.OnDisplayItemsCollectionChanged(Object sender,NotifyCollectionChangedEventArgs e) at Syncfusion.DataSource.DataSource.UpdateCollectionView(Object sender,NotifyCollectionChangedEventArgs e,Boolean isPropertyChanged) at Syncfusion.DataSource.DataSource.OnSourceCollectionChanged(Object sender,NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item) at System.Collections.ObjectModel.Collection`1.Add(T item)
HNHarinath Navaneethakrishnan Syncfusion Team November 16, 2022 09:57 AM
We have confirmed the reported scenario is a
defect and logged a report for the reported scenario “ArgumentOutOfRange
exception when adding items to empty DataSource”. We will include the fix
in our Weekly NuGet release which is scheduled on 6th December 2022.
You can track the status of this defect using
the following feedback link: