Hi,
Is it OK to bind a combo box to more than one datasource?
One is by:
Me.cboState.DataBindings.Add(New Binding("SelectedValue", Me.AddressRow,
"State"))
Another is by a DataView:
aView = New DataView(dsLookup.States)
With Me.cboState
.DataSource = aView
.DisplayMember = "Description"
.ValueMember = "StateAbbr"
End With
Look like it works. But sometimes the field gets empty when I click the
fields around. I steped in and couldn't find any codes doing that. So I
suspect it is a binding issue.
Please help.
Thanks in advance.
Li 5 1234
Hi Li,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to know if we can add multiple
databindings to a ComboBox. If there is any misunderstanding, please feel
free to let me know.
Yes, we can add different bindings to different properties for a control.
But we can add only one binding for one property. Based on the code you
have provided, it is correct. However, I'm not quite sure what you mean by
"the field gets empty when I click the fields around". Could you explain it
a little bit more? Thanks!
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Hi, Kevin:
After debugging, I found out that after I input something in a text box or
make a selection from a combo box, I click other field. Now the form's
IsDisposed = True and causes all controls' IsDisposed = True. That causes the
fields empty, cursor stuck, etc. But after I click several times, the cursor
moves and everything is ok.
I know it looks weird. But do you have any suggestions about how this may
happen? The form is created as a dialog form.
Thanks.
Li
"Kevin Yu [MSFT]" wrote: Hi Li,
First of all, I would like to confirm my understanding of your issue. From your description, I understand that you need to know if we can add multiple databindings to a ComboBox. If there is any misunderstanding, please feel free to let me know.
Yes, we can add different bindings to different properties for a control. But we can add only one binding for one property. Based on the code you have provided, it is correct. However, I'm not quite sure what you mean by "the field gets empty when I click the fields around". Could you explain it a little bit more? Thanks!
Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights."
Hi Li,
This is weird. To make debugging simpler, could you send me a simple
project that can reproduce the problem? I can debug it on my machine and
work it out more quickly. Thank you.
Remove 'online' from the nospam alias is my email.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Hi, Kevin:
I couldn't create a sample from our project to reproduce the problem. I
dis-bind the fields to workaround the problem.
Now I have another problem but I will post as another thread to have the
Subject related to the issue.
Thanks.
Li
"Kevin Yu [MSFT]" wrote: Hi Li,
This is weird. To make debugging simpler, could you send me a simple project that can reproduce the problem? I can debug it on my machine and work it out more quickly. Thank you.
Remove 'online' from the nospam alias is my email.
Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights."
Nice to hear that you have found a workaround.
Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights." This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Fernb2000 |
last post by:
Hello I have a dataset is composed of a table that has a Name and Id
colums. I would like to fill the combo box with the List of names from
the dataset and I would like the text box to be the id...
|
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...
|
by: James |
last post by:
I have a bound combo using a lookup table which is behaving as
expected with the exception of the first record.
In the list of rows for my combo, the first is '.'. This is because of
another...
|
by: Brian Henry |
last post by:
Here's an example of the code.. I have two combo boxes on screen that when
one's selection is change the other's items will be updated to reflect the
change (based on a relation)
Private...
|
by: Richard |
last post by:
I have created a form which sets up a dataview. The form views one
record at a time using a currencymanager. This works fine. All my
text boxes bind.
However I have a combo box which gets its...
|
by: Li Weng |
last post by:
Hi,
Is it OK to bind a combo box to more than one datasource?
One is by:
Me.cboState.DataBindings.Add(New Binding("SelectedValue", Me.AddressRow,
"State"))
Another is by a DataView:
aView =...
|
by: Bill |
last post by:
I have what I think should be a simple question regarding a bound combo box.
My first table is Dealers:
DealerID - primary key
DealerName
BillToLocation
My second table is Locations:...
|
by: =?Utf-8?B?UmVkYmFjaw==?= |
last post by:
Hi All,
slight problem I hope someone could shed some light on.
I am using VS 2005.
In a datagridview I have 2 comboboxes that are both bound to a table field
called "empCode". This is an...
|
by: jaymaelescent |
last post by:
I have been asked by worklace to try and make a database for them, i have some experience but have encountered a problem making user specific reports. I need to make a report based on a person stored...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |