Home Forums WinForms controls Other WinForms controls Working w/ WinComboBox

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18068 |

    I have been trying to work with the WinComboBox in a VB.NET project. I am using Xceed.Editors (v 1.0.5412.0). I am binding data to the ComboBox from a SQL DataSet. All I want it to do is behave like a normal ComboBox in Drop Down mode. I have two fields, the Name and their UserID.

    With a normal Combo box you can display the Name, and then have the Selected Value be the UserID, however no matter what I’ve tried the Drop Down part of the Combo Box includes both the Name and the UserID. The main box (not sure what it is called) after an item is clicked I have made display only the Name and everything works, but it just looks horrible to have their name and UserID shown.

    I have tried deleting the UserID column from the Columns collection, and that affects what is Displayed at the top, but not in the drop down. The Items column I also deleted the UserID column from.

    Thanks,
    Douglas

    Imported from legacy forums. Posted by Douglas (had 2245 views)

    User (Old forums)
    Member
    Post count: 23064

    Try building the sql statement with the column that you want to display.

    Check the displayformat on the combobox, it should have column names in % signs, like this: %Country%

    Imported from legacy forums. Posted by Artmic (had 3001 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.