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?
[381 byte] By [sindhu] at [2007-12-16]
# 1
Have you viewed ValueMember?
CarlosVara at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 2
Both DisplayMember and ValueMember does not display column names when the DataSource has two tables in it.

thanks

sindhu at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 3
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

PaulDomag at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 4
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.

sindhu at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 5
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

PaulDomag at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...

.NET Development

Site Classified