473,322 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

DataBinding and Combo Boxes

I am trying to create a form using databinding to a dataset and one of the
fields requires the user to select from a list of optons. Any hints on how
to do this other than bind the field to a label or text box to display the
current field value then add a combo box with the list of items to chose from?

--
Dennis in Houston
Mar 29 '06 #1
5 1800
I'm sorry but I don't quite understand the question. Could you reword
it please, and I will do my best to answer it.

(for standard binding to a combobox, known as "complex binding" for
some bizarre reason...)

mycombo.datasource = myDataTable ' or, myDataset.Tables(0) or
myDataset.Tables("tablename")
mycombo.DisplayMember = "DisplayField" ' whichever column you want
to display in the combobox
mycombo.ValueMember = "IDField" ' whichever column is the
uniquely identifying column in a row.

Mar 29 '06 #2
Dennis,

As Steven told, give us some more information, from this I cannot get only
gues.

As we are talking about databinding, than the datasource is important
(bindingsource whatever).

As well the properties we want to bind to. For about what you are talking is
probably the dataview your first friend.

Cor
"Dennis" <De****@discussions.microsoft.com> schreef in bericht
news:88**********************************@microsof t.com...
I am trying to create a form using databinding to a dataset and one of the
fields requires the user to select from a list of optons. Any hints on
how
to do this other than bind the field to a label or text box to display the
current field value then add a combo box with the list of items to chose
from?

--
Dennis in Houston

Mar 29 '06 #3
I have a form that is bound to a dataset. On it, there are some text box
controls and also a combo box that I want to display the current dataset row
fields and let the user edit then save to the current dataset row being
displayed.

For the combo box, I want to display the current value of the field in the
current DataSet Row and allow the user to change it by selecting a new value
from a drop down list. I can add the allowable values to the combobox but
can't seem to get the combobox to show the current field value using
databinding.

--
Dennis in Houston
"Cor Ligthert [MVP]" wrote:
Dennis,

As Steven told, give us some more information, from this I cannot get only
gues.

As we are talking about databinding, than the datasource is important
(bindingsource whatever).

As well the properties we want to bind to. For about what you are talking is
probably the dataview your first friend.

Cor
"Dennis" <De****@discussions.microsoft.com> schreef in bericht
news:88**********************************@microsof t.com...
I am trying to create a form using databinding to a dataset and one of the
fields requires the user to select from a list of optons. Any hints on
how
to do this other than bind the field to a label or text box to display the
current field value then add a combo box with the list of items to chose
from?

--
Dennis in Houston


Mar 30 '06 #4
Dennis,

This sample is with a datagrid, (mainly to show the different ways of
databinding) however it is mainly the same. As soon as you have databind
something it is sticked to the current row.
If you want to let them work independent, than you have to create seperate
dataviews.

http://www.vb-tips.com/default.aspx?...f-587f730fa118

A problem is that using the combobox textbox for operations seems for me one
chain of bugs.
I reported lately one for 2005.

Also I have posted in past those in different newsgroups to see a reaction.
I got the idea than the Combobox problems are a plague I have never got any
reaction.

However, I hope this helps, and otherwise reply.

Cor

"Dennis" <De****@discussions.microsoft.com> schreef in bericht
news:44**********************************@microsof t.com...
I have a form that is bound to a dataset. On it, there are some text box
controls and also a combo box that I want to display the current dataset
row
fields and let the user edit then save to the current dataset row being
displayed.

For the combo box, I want to display the current value of the field in the
current DataSet Row and allow the user to change it by selecting a new
value
from a drop down list. I can add the allowable values to the combobox but
can't seem to get the combobox to show the current field value using
databinding.

--
Dennis in Houston
"Cor Ligthert [MVP]" wrote:
Dennis,

As Steven told, give us some more information, from this I cannot get
only
gues.

As we are talking about databinding, than the datasource is important
(bindingsource whatever).

As well the properties we want to bind to. For about what you are talking
is
probably the dataview your first friend.

Cor
"Dennis" <De****@discussions.microsoft.com> schreef in bericht
news:88**********************************@microsof t.com...
>I am trying to create a form using databinding to a dataset and one of
>the
> fields requires the user to select from a list of optons. Any hints on
> how
> to do this other than bind the field to a label or text box to display
> the
> current field value then add a combo box with the list of items to
> chose
> from?
>
> --
> Dennis in Houston


Mar 30 '06 #5
Thanks Cor. I suspected that it wasn't that easy to do with a dataset.
--
Dennis in Houston
"Cor Ligthert [MVP]" wrote:
Dennis,

This sample is with a datagrid, (mainly to show the different ways of
databinding) however it is mainly the same. As soon as you have databind
something it is sticked to the current row.
If you want to let them work independent, than you have to create seperate
dataviews.

http://www.vb-tips.com/default.aspx?...f-587f730fa118

A problem is that using the combobox textbox for operations seems for me one
chain of bugs.
I reported lately one for 2005.

Also I have posted in past those in different newsgroups to see a reaction.
I got the idea than the Combobox problems are a plague I have never got any
reaction.

However, I hope this helps, and otherwise reply.

Cor

"Dennis" <De****@discussions.microsoft.com> schreef in bericht
news:44**********************************@microsof t.com...
I have a form that is bound to a dataset. On it, there are some text box
controls and also a combo box that I want to display the current dataset
row
fields and let the user edit then save to the current dataset row being
displayed.

For the combo box, I want to display the current value of the field in the
current DataSet Row and allow the user to change it by selecting a new
value
from a drop down list. I can add the allowable values to the combobox but
can't seem to get the combobox to show the current field value using
databinding.

--
Dennis in Houston
"Cor Ligthert [MVP]" wrote:
Dennis,

As Steven told, give us some more information, from this I cannot get
only
gues.

As we are talking about databinding, than the datasource is important
(bindingsource whatever).

As well the properties we want to bind to. For about what you are talking
is
probably the dataview your first friend.

Cor
"Dennis" <De****@discussions.microsoft.com> schreef in bericht
news:88**********************************@microsof t.com...
>I am trying to create a form using databinding to a dataset and one of
>the
> fields requires the user to select from a list of optons. Any hints on
> how
> to do this other than bind the field to a label or text box to display
> the
> current field value then add a combo box with the list of items to
> chose
> from?
>
> --
> Dennis in Houston


Mar 31 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: FZ | last post by:
Hi Gang, I was wondering if a generous person might be able to walk me through what I believe is a pretty simple task. I actually have significant Access experience, but I haven't done it in...
0
by: Krisa | last post by:
Hello all, I just discovered something (stop me if you've heard this before....) that was causing me a significant performance hit when opening a form with subforms. To speed up loading the...
1
by: Gary Shell | last post by:
I have a pair of combo boxes on a form. Both have their SelectedValue property bound to a column on a table called "Input_Output". One column is called "Class" and the second is called "SubClass"....
0
by: Tom | last post by:
I have some very strange issues with combo boxes on a tab control. Here's the scenario: I have a Windows Forms form that has a tab control on it, with two (2) tabs. Tab 2 happens to have a number...
4
by: Dave | last post by:
I wasn't sure how to search for previous posts about this, it felt real specific. Ok so here's the database & problem: I have 4 combo boxes: cboServer, cboPolicy, cboDB, and cboApplication. ...
6
by: Dave | last post by:
I want to put the information that the user selects in my combo boxes into a subform that lies on the same form as the combo boxes. Thanks for your help already, Dave
1
by: Dave | last post by:
Hello all, First I'd like to apologize...This post was meant to be put in my previous post, but I tried many times without success to reply within my previous post. Now here goes... I have a...
2
by: Dave | last post by:
I have 3 tables of information feeding into 4 combo boxes on my main form (DR Form). I have as many list boxes (acting as text boxes) as there are fields in each one of the 3 tables. Once...
2
by: someshbakliwal | last post by:
Hi, I have created some autopopulating combo boxes on my HTML page (script- Javascript). so these combo boxes are autopopulated with choices made in previous combo boxes. The problem I am facing is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.