We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SfComboBox Uncaught ArgumentOutOfRange Exception When Adding Items To Empty DataSource

Hello,

I believe I'm experiencing the same issue as this user: https://www.syncfusion.com/forums/177985/unhandled-index-out-of-range-expection-when-setting-datasource

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 (20.3.0.57) 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)


Thanks,

Robert


1 Reply

HN Harinath 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:

https://www.syncfusion.com/feedback/39147/argumentoutofrange-exception-when-adding-items-to-empty-datasource


If you have any more specification replication procedures or a scenario to be tested, you can add it as a comment in the portal.


Please let us know if you need any further assistance.


Note: The provided feedback link is private, and you need to log in to view this feedback.




Loader.
Live Chat Icon For mobile
Up arrow icon