Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
Binding UltraListView to IList
posted

Can anyone point me to an example of how to bind an UltraListView object to an IList object?

I am replacing a ListBox object with an UltraListView.

The original code was just assigning the IList to the property ListBox.DataSource:

availableListBox.DataSource = availableIList;

UltraListView does not have a DataSource property, so I tried:

availableUltraList.DataBindings.Add("Items", availableIList, "Text");

I am new to data binding and my attempt above is failing at runtime with an ArgumentExcpetion because "Items" is read only.

Part of the problem is that I do not understand what I should put for the 1st or 3rd parameter. I have not found any clear documentation.

Thanks in advance,

Larry

Parents
  • 235
    posted

    I also found that trying to add a binding on the ListBox as shown below also throws the same exception.

    availableListBox.DataBindings.Add("Items", availableIList, "Text");

    I guess that makes sense since for both classes the DataBindings property is only a getter. But that does not get me any closer to solving the problem.

    Why doesn't UltraListView have a DataSource property?

    Larry

     

Reply Children