StrataFrame Forum

ComboboxEdit question...

http://forum.strataframe.net/Topic16539.aspx

By StarkMike - 5/22/2008

Lets say I have a ComboBoxEdit that based on other factors may only have 1 item in it. How can I tell how many items are in the ComboBoxEdit and if there is only one how can I select that one Item in code? Keep in mind that the 1 item could be different depending on circumstances so its not as simple as knowing the value to set the SelectedValue to...



Thanks
By Bill Cunnien - 5/22/2008

Check the count with:

comboBoxEdit1.Items.Count

Then, set the selected index, if there is only one item:

comboBoxEdit1.SelectedIndex = 0

Not sure if that is what you are looking for...

Bill

By Trent L. Taylor - 5/22/2008

I think that Bill pretty much nailed it....let us know if that isn't what you were looking for.
By StarkMike - 5/22/2008

That IS what i wanted! Thanks!!