I need a simple combo dropdown with two columns.
I have the data in an array and I am trying to get it into the ultracombo.
What is the best way to do this?
If you have the data in an array of objects and the two fields you want to display are public properties on those objects, then the easiest thing to do is to just set your UltraCombo's DataSource to the array.
If that doesn't work because the properties aren't public or the array does not contain objects, then I'd recommend that you copy the data into an UltraDataSource component and use that as the DataSource of your combo.
Mike,
I did move the data into a datasource. That worked.
I have several combos on this form.
I want to pre-select one of the values in each combo so the user doesn't have to choose it. It is a default selection of sorts. I am unable to find information of how to do that. I have tried the combo.value and that doesn't work the way I need. I thought I could use SelectedRow, but not able to figure out how to make it work for me.
Also, I have a data file that holds some of the preset information. I built a two column combo that has the month# and month name in it. The ValueMember is set to the Month Name. If the data file says that the preset is supposed to be "03", then what is the best way to set the combo to default to the third row of the combo (03 | March)? Is there a way to use the "03" as an index to the combo row?
Thanks,
Duane