By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,890 Members | 1,248 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,890 IT Pros & Developers. It's quick & easy.

Associate combobox value with grid

P: n/a
hi, All

I am trying to achieve a simple programming task ie; when the user selects
an item from the comboBox ,the relevant data should be displayed in the
grid. I am using Publisher & Titles tables of Biblo.mdb as an example,
where in Publisher names are displayed in the cmbox and all the titles
related to each are disaplyed in the grid.This is what i am doing but
nothing is displayed in the grid . Can someone advise pl.

'fill the dataset & Create a relation
daPublishers.Fill(dsBiblo, "Publishers")
daTitles.Fill(dsBiblo, "Titles")
dsBiblo.Relations.Add( _
"PubTitles", dsBiblo.Tables("Publishers").Columns("PubID"), _
ComboBox1.DisplayMember = "Name"
ComboBox1.ValueMember = "PubID"
ComboBox1.DataSource = dsBiblo.Tables("Publishers")
ComboBox1.DataBindings.Add("SelectedValue", dsBiblo.Tables("Titles"),

gridTitles.DataSource = dsBiblo
gridTitles.DataMember = "publishers.pubTitles" 'using th relation above

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a

Can you try this one
GridTitles.SetDataBinding(DsBiblio, "Publishers.PubTitles")

And in my opinion can you remove that Databinding from your combobox

I hope this helps,

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.