Problem with combobox and displayMember property with datasource.

  • Thread starter Thread starter fedrok
  • Start date Start date
F

fedrok

Hi to you all.

I'm trying to read a Ms Access table using strongly typed Dataset in Vs2005.

So I assign the datasource property of a combobox in the following mode:

---------------
myCombo.DataSource = MyDataTable
myCombo.ValueMember = MyDataTable.Columns(0).ColumnName
myCombo.DisplayMember = MyDataTable.Columns(0).ColumnName
----

But the problem is that DisplayMember property seems to not work.
I obtain a combobox with ValueMember correctly set, but all visible values
are empty strings.

Why doesn't DisplayMember works?

I'm not using "order by" clause in the query and not using sorted property
of combobox object.

Can you help me?

thanks.
 
Fedrok,

You tell you use a strongly typed dataset, but you show us a method around a
datatable, what is it?

Cor
 
Hi Cor.
It's a method built by me.
I only read an Access table filtering with some criterions. Nothing special.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top