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
1705
How to bind a WinCombo to a List<T>
posted

Hey guys, how can I bind the combo to a List<T>

if I add the columns manually to the WinCombo and then set the datasource to the list, it will ignore the columns I added and display all the properties of the list as columns.

 I thought I could use the UltraDataSource but I couldn't figure out how to populate it since the following is not possible: 

ultraDataSource1.DataSource = List 

 so far this is what I'm doing:

 

foreach (ValidvaluesBO vvl in vvlList)
{
    ultraDataSource1.Rows.Add(new object[{vvl.Code , vvl.Name} );               
}

 combo.DataSource = ultraDataSource1 ;

 

but I was wondering if there is some other way of doing this. 

 

any ideas?

 

thanks ! 

Parents Reply Children