problem with dataset in combobox

I am creating a dataset from two tables. the combobox datasource is set to this dataset. but when I try to set the displaymember and valuemember properties, the drop down window is not displaying any column names. only "none" is available. If I use only one table, the columns of the table gets displyed properly. why I am not able to view the columns in two tables together


Answer this question

problem with dataset in combobox

  • ClintZync

    Hi,



    Ok, tried it and it displayed none. Actually, what your datasource here is not really a dataset object, instead a BindingSource object. I don't really know if the combobox supports this at runtime.
    What I did was drag a DataSet object from the toolbox and used a typed dataset by selecting the name in the combobox provided. I used this generated dataset in the datasource of the Combobox, and voila it displays the two records...Big Smile





    cheers,


    Paul June A. Domag

  • Mathieu DESPRIEE

    Both DisplayMember and ValueMember does not display column names when the DataSource has two tables in it.

    thanks

  • Alejandro Mario

    Hi,



    I just tried binding a Dataset to a combobox. And it works just fine. I'm using VS2005 B2.
    Could you give us steps to replicate this Coz this might be a possible bug...






    cheers,

    Paul June A. Domag

  • DelboyJay

    Okay
    I have an employee database
    It has two tables, say table1 and table2
    Now Open the datasource dropdown and click Add Project DataSource Link
    From the datasource wizard choose database, connect to Employee database and check the checkboxes of table1 and table2 and create a DataSet named EMPDataSet. Then the DataSource will be set as EMPDataSetBindingSource.

    Now to set DisplaMember and ValueMember open their respective dropdown windows. No column are listed other than none.

  • David Hale - MSFT

    Have you viewed ValueMember

  • problem with dataset in combobox