473,545 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamically adding values to bound combobox??

I have a bound combobox the appears on a cell within the column of my bound
grid when the user clicks on a cell n(In my vb.net WinForm app).
I am trying to allow the adding of an item to that bound combo by allowing
the user to dynamically type in the new value directly in the combo box
whcih in turn updates the lookup table and then when they have finished
leaves that particular cell on the grid with the correct value.

Seems straight-forward enough but I have been having a time especially with
the return value from the lookup, etc. Any ideas (and code)?

Nov 20 '05 #1
5 4647

"Aaron Ackerman" <no@spam.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..

Please do not crosspost questions between .NET and non-.NET groups. The
*.vb.* groups are for VB6 and earlier.
Nov 20 '05 #2
I used an ArrayList to fill my combo box and when a user added a new entry
that did not exist in the combo box I added it to the array list and then
sorted. After which the entry would appear in the drop down box.

"Aaron Ackerman" <no@spam.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I have a bound combobox the appears on a cell within the column of my bound grid when the user clicks on a cell n(In my vb.net WinForm app).
I am trying to allow the adding of an item to that bound combo by allowing
the user to dynamically type in the new value directly in the combo box
whcih in turn updates the lookup table and then when they have finished
leaves that particular cell on the grid with the correct value.

Seems straight-forward enough but I have been having a time especially with the return value from the lookup, etc. Any ideas (and code)?

Nov 20 '05 #3
Hi Aaron,

Do you mean the ComboBox and DataGrid control in VB.NET
or
the DB Grid and DB ComboBox in VB6 ActiveX control?

If it is the first case, then the ComboBox is a control covering onto the
datagrid cell.
So you may need to update the data into table by manual.
Based on my understanding, you want to add some item into the combobox and
then update into the table, i.e. the cell value in the datagrid. But when
you add more than one item into the combobox, which one should be update
into the table?

Did I misunderstand your meaning?
If you have any question please post here.
I also hope that you can post some code to demostate what you want to do.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
From: "Aaron Ackerman" <no@spam.com>
Subject: Dynamically adding values to bound combobox??
Date: Thu, 23 Oct 2003 16:01:59 -0400
Lines: 12
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#F************ **@TK2MSFTNGP09 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.genera l,microsoft.pub lic.dotnet.lang uages.vb,micros o
ft.public.dotne t.languages.vb. controls,micros oft.public.vb.g eneral.discussi o
nNNTP-Posting-Host: ric-64-83-27-134-serial-sta.t1.cavtel.n et 64.83.27.134
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:149671 microsoft.publi c.dotnet.langua ges.vb.controls :2991
microsoft.publi c.vb.general.di scussion:466158
microsoft.publi c.dotnet.genera l:113020X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb

I have a bound combobox the appears on a cell within the column of my bound
grid when the user clicks on a cell n(In my vb.net WinForm app).
I am trying to allow the adding of an item to that bound combo by allowing
the user to dynamically type in the new value directly in the combo box
whcih in turn updates the lookup table and then when they have finished
leaves that particular cell on the grid with the correct value.

Seems straight-forward enough but I have been having a time especially with
the return value from the lookup, etc. Any ideas (and code)?


Nov 20 '05 #4
No thanks.

"Jeff Johnson [MVP: VB]" <i.***@enough.s pam> wrote in message
news:uR******** ******@tk2msftn gp13.phx.gbl...

"Aaron Ackerman" <no@spam.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..

Please do not crosspost questions between .NET and non-.NET groups. The
*.vb.* groups are for VB6 and earlier.

Nov 20 '05 #5
Hi Aaron,

Did my last suggestion works for you?
If you have any question on this issue,please post here.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 20 '05 #6

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

Similar topics

3
1710
by: Aaron Ackerman | last post by:
I have a bound combobox the appears on a cell within the column of my bound grid when the user clicks on a cell n(In my vb.net WinForm app). I am trying to allow the adding of an item to that bound combo by allowing the user to dynamically type in the new value directly in the combo box whcih in turn updates the lookup table and then when they...
8
2931
by: Kevin Little | last post by:
#!/usr/bin/env python ''' I want to dynamically add or replace bound methods in a class. I want the modifications to be immediately effective across all instances, whether created before or after the class was modified. I need this to work for both old ('classic') and new style classes, at both 2.3 and 2.4. I of course want to avoid...
11
2274
by: Steven D'Aprano | last post by:
Suppose I create a class with some methods: py> class C: .... def spam(self, x): .... print "spam " * x .... def ham(self, x): .... print "ham * %s" % x .... py> C().spam(3) spam spam spam
1
1406
by: Marco Roberto | last post by:
Hi, is there anyway to add itens into a combobox after this control be bound with a dataset? Regards, Marco
9
424
by: Greg | last post by:
Binding Manager & dataset - won't add record I've got an untyped dataset with controls bound through code. The user can select a question number from a bound combobox, and the question number and question text are displayed in bound textboxes. This part works fine. When I go to add a new record, the textboxes clear as they should. I enter a...
1
1601
by: Kevin Hodgson | last post by:
I have a DataBound ComboBox, which has a text value as the Value property, and the UniqueID for that value is bound to the Combobox.Tag property. When a user makes a new selection in the combobox, I need to run a SQL Query with the UniqueID of the new value they are picking. The .SelectedIndexChanged and .SelectedValueChanged events give...
2
7519
by: dancole42 | last post by:
So I have a subform that lists the various items on a particular invoice. First, the user selects a product class from the Class dropdown. This is bound to the Class field in the InvioceLines table. The rowsource for the combobox is: ClassName, ClassID, ClassSort from the Class table, with the bound column set to ClassID.
13
1511
by: Konrad Hammerer | last post by:
Hi! Can somebody tell me or show me an example how to add a textbox and a button dynamically by code to an apsx page and how to read the filled in value from the textbox after the user has clicked the button? I have tried this without success because after the user has clicked the button, the textbox seems to be disappeard! I have added...
3
4266
by: crjunk | last post by:
Is is possible to dynamically create and add textboxes to a form when a button is clicked? I've written and tried to execute the following code: Dim ctrl As Control Dim ctlNameCB As ComboBox Dim FieldName As String Private Sub brnOverlay_Click(ByVal sender As System.Object, ByVal
0
7415
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...
0
7928
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...
1
7440
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...
0
7775
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...
0
5997
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4963
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3470
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...
0
3451
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1030
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.