473,803 Members | 3,416 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ComboBox design-time DataBinding setting questions.

These setting mystify me for these reasons.

*SelectedItem* - Help says that 'SelectedItem' gets or sets the
currently selected item in the combobox.

*SelectedValue* - Help says that 'SelectedValue' gets or sets the value
of the member property specified by the ValueMember property.

*ValueMember* - Help says that the 'ValueMember' Gets or sets the
property to use as the actual value for the items in the ListControl.

The above three properties are described as results of runtime events!
What are they doing in the properties section of the ComboBox?????

How do I use them to sync a databound combobox on a form with the
current bound row on the form?

Please help me understand how to use these settings?

Thank you,
dbuchanan

Feb 1 '06 #1
3 2009
Hi,

The combobox is a control (as any listcontrol as the listbox by the way)
which can be used in more ways. One of those is that it can be used with an
array as a simple control and it can be used as a complex data bound
control. However that is not intermixed it is just one of those ways. Which
means as well that they can work completely different by instance with
events.

In the simple format you have the SelectedItem in the complex dataformat you
use by instance the SelectedValue (for the valuemember) or the SelectedText
for the displaymember.

I hope this helps a little bit,

cor
Feb 1 '06 #2
Cor,
I hope this helps a little bit,


No, it didn't address my questions.

Read my questions again.

dbuchanan

Feb 1 '06 #3
>
The above three properties are described as results of runtime events!

They are not, it are just properties as any other property from which
forever the result can be depending from another property, however it has
nothing to do with an event. As every property can they be used in an event.

What are they doing in the properties section of the ComboBox?????
See previous answer
How do I use them to sync a databound combobox on a form with the
current bound row on the form?

That is standard if they have the same datasource.

Cor
Feb 1 '06 #4

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

Similar topics

6
7486
by: Omar | last post by:
When I try to databind my comboBox (specifically field "emplcode") to a filled dataset , the contents of the comboBox displays a bunch of "System.Data.DataRowView". I assume the amount of times "System.Data.DataR..." is displayed inside the combobox is the amount of records in the dataset. On the other hand, if my query is "select emplcode from payemployee", the databind will work fine (but I don't want to limit the dataset to one field)....
1
6399
by: Rachel Suddeth | last post by:
When I put a ComboBox on a form, I can enter strings through the designer to fill Items collections. I have put a ComboBox in a UserControl, and exposed the the Items collections with the same type... public class ControlWithComboBox : MyControls.BaseControl, IDataEntryControl { ... protected System.Windows.Forms.ComboBox comboBox; ... public ComboBox.ObjectCollection Items
4
4020
by: Keith | last post by:
Hello - this started out as a minor annoyance - and now is starting to bother me more and more - I'm hoping someone can help me. I would like to have a combobox display - NOT initially be blank - but contain a value. However the value is just for user reference - not really one of the combobox choices. For example intially the combobox should equal the word Select - and the item values can be say 'one', 'two', and 'three'.
2
1643
by: Becker | last post by:
I have a need for a simple combobox on a form in one of my programs that represents city, state. I want to have it autocomplete as the user types. I have a table with these values (about 50k of them) and I'd like to source it from there. I have seen some methods out there for the autocomplete, but I think that pulling 50k in the combobox might be too slow at runtime to build a table of all those records and then bind the entire combobox...
8
2074
by: Dennis D. | last post by:
Preface: I have viewed the combobox control video at Microsoft.at the movies. I want to simulate an HTML combobox as a windows application combobox with 5 to 10 selections in each box. In the HTML form: <option value="help.htm">More Info</option> Thing is: I want to put the URL description "More Info" into the combobox list, not the URL "help.htm."
1
2156
by: Jochen Berger | last post by:
Moin! I've 'composed' a special UserControl I need for my current project. On this Control I put a ComboBox. The user is not allowed to access the ComboBox directly (to protect some properties), so I used Properties to enable the user to do some things in design mode. It all works fine except for the Items property: public ComboBox.ObjectCollection Items {
14
4811
by: Chris | last post by:
I have a need to have a combo box that just has Yes & No as it options. This will be used everywhere in the application, so I thought I would make a control that inherits from combobox. I am having trouble figuring out how to add the Y/N in control. I tried: Public Class YesNoCombobox Inherits ComboBox Sub New() MyBase.New()
2
1326
by: TheSteph | last post by:
Hi ! I have a question : the ComboBox control have NO single border, and height is at least 1 pixel higher than TextBox. There is absolutely NO good reason for making a ComboBox looking that way. My question is WHY Microsoft did that in the 3 versions of Visual Studio/.NET releases (and probably will stay like that in the next version of VS) ????
4
4907
by: Greg (codepug | last post by:
Private Sub cboBody_KeyDown(KeyCode As Integer, SHIFT As Integer) 'Delete combobox entry if Del or Backspace key is hit. If (KeyCode = 46) Or (KeyCode = 8) Then Me.cboBody = "" End Sub I have used identical code in the KeyDown event of my other comboboxes to clear the box when the delete or backspace key is pressed. It works for many identical comboboxes just fine except for the cboBody combo. I have looked this over and cannot find...
2
35153
by: Silgd1 | last post by:
Hey All; I have a form with a ComboBox. I populate the ComboBox with the following query: SELECT ., . FROM customers ORDER BY .; This query populates the comboBox with all the customer names from the customer table. I want to be able to select a customer from the comboBox and pass it as a parameter to another query, but what I keep getting is the customers.id from the customers table as an integer when I really want the customers...
0
9703
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9565
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10317
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10295
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7604
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.