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

Unhandled index out of range expection when setting datasource

Dear support,

I updated the SfComboBox nuget package to the latest version, version I am using Xamarin forms version When I add items to the ObservableCollection which I binded to the DataSource property of the SfComboBox, there is an unhandled exception and the app crashes. The error details are:


  Message=Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

I get the error when I do the following:


public class Test


    public int ID { get; set; }

    public string Description { get; set; }


In ViewModel:

private ObservableCollection<Test> list;

public ObservableCollection<Test> List


    get { return list; }



        list = value;




public ViewModel()


    List = new ObservableCollection<Test>();

    list.Add(new Test { ID = 1, Description = "Test" });



<inputLayout:SfTextInputLayout ContainerBackgroundColor="Transparent"


                                    <combobox:SfComboBox ShowSuggestionsOnFocus="True"





                                                         DataSource="{Binding List}"/>


1 Reply

RS Ruba Shanmugam Syncfusion Team October 6, 2022 07:58 AM

Hi Jano,

Query: Unhandled index out of range expection when setting datasource

We have checked the reported query and we have already fixed the issue in our latest version. Could you please check your application with the latest version of SfComboBox and let us share the details if you still facing the same problem?


Ruba Shanmugam

Live Chat Icon For mobile
Up arrow icon