473,396 Members | 2,018 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,396 software developers and data experts.

ComboBox Text Return

I am new to this so bear with me.

I have a set of combo boxes. Lets call them ComboBox1 and ComboBox2.

ComboBox1 items are pulled from a table. When a user selects a certain item
I want to disable ComboBox2. i can make this work in Visual Web Developer,
but have been unsuccessful in Visual Basic 2005.
Jun 16 '06 #1
10 2062
Can you show it how you would do it in aspnet, maybe is that the best
traject to show it you in VBNet.

Did you know by the way that the most active VB newsgroup is

microsoft.public.dotnet.languages.vb

Cor

"news.microsoft.com" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
I am new to this so bear with me.

I have a set of combo boxes. Lets call them ComboBox1 and ComboBox2.

ComboBox1 items are pulled from a table. When a user selects a certain
item I want to disable ComboBox2. i can make this work in Visual Web
Developer, but have been unsuccessful in Visual Basic 2005.

Jun 17 '06 #2
DJ
I can make it work in Visual Web Developer 2005 with the following syntax:

If DropDownBox1.SelectedItem.Text = "Normal" Then
DropDownBox6.Enabled = False
Else
DropDownBox6.Enabled = True
EndIF

I was hoping that the following would work in VB 2005 but so far I have been
unsuccessful in making it work.

If ComboBox.SelectedItem.Text = "Normal" but there is no Text child object
for Selected Item.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:ef**************@TK2MSFTNGP04.phx.gbl...
Can you show it how you would do it in aspnet, maybe is that the best
traject to show it you in VBNet.

Did you know by the way that the most active VB newsgroup is

microsoft.public.dotnet.languages.vb

Cor

"news.microsoft.com" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
I am new to this so bear with me.

I have a set of combo boxes. Lets call them ComboBox1 and ComboBox2.

ComboBox1 items are pulled from a table. When a user selects a certain
item I want to disable ComboBox2. i can make this work in Visual Web
Developer, but have been unsuccessful in Visual Basic 2005.


Jun 17 '06 #3
DJ,

In my idea is the currenttext in a combobox is always the selectedtext.
Combobox1.text = normal

What do I miss?

Cor

"DJ" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
I can make it work in Visual Web Developer 2005 with the following syntax:

If DropDownBox1.SelectedItem.Text = "Normal" Then
DropDownBox6.Enabled = False
Else
DropDownBox6.Enabled = True
EndIF

I was hoping that the following would work in VB 2005 but so far I have
been unsuccessful in making it work.

If ComboBox.SelectedItem.Text = "Normal" but there is no Text child object
for Selected Item.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:ef**************@TK2MSFTNGP04.phx.gbl...
Can you show it how you would do it in aspnet, maybe is that the best
traject to show it you in VBNet.

Did you know by the way that the most active VB newsgroup is

microsoft.public.dotnet.languages.vb

Cor

"news.microsoft.com" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
I am new to this so bear with me.

I have a set of combo boxes. Lets call them ComboBox1 and ComboBox2.

ComboBox1 items are pulled from a table. When a user selects a certain
item I want to disable ComboBox2. i can make this work in Visual Web
Developer, but have been unsuccessful in Visual Basic 2005.



Jun 18 '06 #4
DJ
Correct me if I am wrong but ComboBox1.Text = "Normal" would set the text in
the box to Normal.

What I am trying to do is return the text value of whatever item is selected
so that when one imparticular item (Normal) is selected, ComboBox6 will be
disabled.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2*****************@TK2MSFTNGP03.phx.gbl...
DJ,

In my idea is the currenttext in a combobox is always the selectedtext.
Combobox1.text = normal

What do I miss?

Cor

"DJ" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
I can make it work in Visual Web Developer 2005 with the following syntax:

If DropDownBox1.SelectedItem.Text = "Normal" Then
DropDownBox6.Enabled = False
Else
DropDownBox6.Enabled = True
EndIF

I was hoping that the following would work in VB 2005 but so far I have
been unsuccessful in making it work.

If ComboBox.SelectedItem.Text = "Normal" but there is no Text child
object for Selected Item.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:ef**************@TK2MSFTNGP04.phx.gbl...
Can you show it how you would do it in aspnet, maybe is that the best
traject to show it you in VBNet.

Did you know by the way that the most active VB newsgroup is

microsoft.public.dotnet.languages.vb

Cor

"news.microsoft.com" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
I am new to this so bear with me.

I have a set of combo boxes. Lets call them ComboBox1 and ComboBox2.

ComboBox1 items are pulled from a table. When a user selects a certain
item I want to disable ComboBox2. i can make this work in Visual Web
Developer, but have been unsuccessful in Visual Basic 2005.



Jun 18 '06 #5
DJ,

I mean

If Combobox1.Text ="Normal" then instead of your code

If DropDownBox1.SelectedItem.Text = "Normal" Then

Cor
"DJ" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
Correct me if I am wrong but ComboBox1.Text = "Normal" would set the text
in the box to Normal.

What I am trying to do is return the text value of whatever item is
selected so that when one imparticular item (Normal) is selected,
ComboBox6 will be disabled.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2*****************@TK2MSFTNGP03.phx.gbl...
DJ,

In my idea is the currenttext in a combobox is always the selectedtext.
Combobox1.text = normal

What do I miss?

Cor

"DJ" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
I can make it work in Visual Web Developer 2005 with the following
syntax:

If DropDownBox1.SelectedItem.Text = "Normal" Then
DropDownBox6.Enabled = False
Else
DropDownBox6.Enabled = True
EndIF

I was hoping that the following would work in VB 2005 but so far I have
been unsuccessful in making it work.

If ComboBox.SelectedItem.Text = "Normal" but there is no Text child
object for Selected Item.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:ef**************@TK2MSFTNGP04.phx.gbl...
Can you show it how you would do it in aspnet, maybe is that the best
traject to show it you in VBNet.

Did you know by the way that the most active VB newsgroup is

microsoft.public.dotnet.languages.vb

Cor

"news.microsoft.com" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
>I am new to this so bear with me.
>
> I have a set of combo boxes. Lets call them ComboBox1 and ComboBox2.
>
> ComboBox1 items are pulled from a table. When a user selects a certain
> item I want to disable ComboBox2. i can make this work in Visual Web
> Developer, but have been unsuccessful in Visual Basic 2005.
>
>



Jun 18 '06 #6
DJ
Cor,
Thanks for the suggestion. Unfortunately it doesn't work either.

Any other ideas?

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:Om**************@TK2MSFTNGP04.phx.gbl...
DJ,

I mean

If Combobox1.Text ="Normal" then instead of your code

If DropDownBox1.SelectedItem.Text = "Normal" Then

Cor
"DJ" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
Correct me if I am wrong but ComboBox1.Text = "Normal" would set the text
in the box to Normal.

What I am trying to do is return the text value of whatever item is
selected so that when one imparticular item (Normal) is selected,
ComboBox6 will be disabled.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2*****************@TK2MSFTNGP03.phx.gbl...
DJ,

In my idea is the currenttext in a combobox is always the selectedtext.
Combobox1.text = normal

What do I miss?

Cor

"DJ" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
I can make it work in Visual Web Developer 2005 with the following
syntax:

If DropDownBox1.SelectedItem.Text = "Normal" Then
DropDownBox6.Enabled = False
Else
DropDownBox6.Enabled = True
EndIF

I was hoping that the following would work in VB 2005 but so far I have
been unsuccessful in making it work.

If ComboBox.SelectedItem.Text = "Normal" but there is no Text child
object for Selected Item.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:ef**************@TK2MSFTNGP04.phx.gbl...
> Can you show it how you would do it in aspnet, maybe is that the best
> traject to show it you in VBNet.
>
> Did you know by the way that the most active VB newsgroup is
>
> microsoft.public.dotnet.languages.vb
>
> Cor
>
> "news.microsoft.com" <re***@cox.net> schreef in bericht
> news:%2****************@TK2MSFTNGP04.phx.gbl...
>>I am new to this so bear with me.
>>
>> I have a set of combo boxes. Lets call them ComboBox1 and ComboBox2.
>>
>> ComboBox1 items are pulled from a table. When a user selects a
>> certain item I want to disable ComboBox2. i can make this work in
>> Visual Web Developer, but have been unsuccessful in Visual Basic
>> 2005.
>>
>>
>
>



Jun 18 '06 #7
DJ,

Yes show the code that you are curently using to set the binding to the
datasource, it seems you have something very special.

Cor

"DJ" <re***@cox.net> schreef in bericht
news:OQ**************@TK2MSFTNGP03.phx.gbl...
Cor,
Thanks for the suggestion. Unfortunately it doesn't work either.

Any other ideas?

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:Om**************@TK2MSFTNGP04.phx.gbl...
DJ,

I mean

If Combobox1.Text ="Normal" then instead of your code

If DropDownBox1.SelectedItem.Text = "Normal" Then

Cor
"DJ" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
Correct me if I am wrong but ComboBox1.Text = "Normal" would set the
text in the box to Normal.

What I am trying to do is return the text value of whatever item is
selected so that when one imparticular item (Normal) is selected,
ComboBox6 will be disabled.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2*****************@TK2MSFTNGP03.phx.gbl...
DJ,

In my idea is the currenttext in a combobox is always the selectedtext.
Combobox1.text = normal

What do I miss?

Cor

"DJ" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I can make it work in Visual Web Developer 2005 with the following
>syntax:
>
> If DropDownBox1.SelectedItem.Text = "Normal" Then
> DropDownBox6.Enabled = False
> Else
> DropDownBox6.Enabled = True
> EndIF
>
> I was hoping that the following would work in VB 2005 but so far I
> have been unsuccessful in making it work.
>
> If ComboBox.SelectedItem.Text = "Normal" but there is no Text child
> object for Selected Item.
>
> "Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
> news:ef**************@TK2MSFTNGP04.phx.gbl...
>> Can you show it how you would do it in aspnet, maybe is that the best
>> traject to show it you in VBNet.
>>
>> Did you know by the way that the most active VB newsgroup is
>>
>> microsoft.public.dotnet.languages.vb
>>
>> Cor
>>
>> "news.microsoft.com" <re***@cox.net> schreef in bericht
>> news:%2****************@TK2MSFTNGP04.phx.gbl...
>>>I am new to this so bear with me.
>>>
>>> I have a set of combo boxes. Lets call them ComboBox1 and ComboBox2.
>>>
>>> ComboBox1 items are pulled from a table. When a user selects a
>>> certain item I want to disable ComboBox2. i can make this work in
>>> Visual Web Developer, but have been unsuccessful in Visual Basic
>>> 2005.
>>>
>>>
>>
>>
>
>



Jun 19 '06 #8
DJ
I am using Microsoft Visual Basic 2005 Express Edition. I selected the
ComboBox and checked "Use Data Bound Items". Data Source is set to the SQL
Table. I believe the underlying code is
NewProjectDataSet.Morph.Fill,GetData()

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:ew**************@TK2MSFTNGP04.phx.gbl...
DJ,

Yes show the code that you are curently using to set the binding to the
datasource, it seems you have something very special.

Cor

"DJ" <re***@cox.net> schreef in bericht
news:OQ**************@TK2MSFTNGP03.phx.gbl...
Cor,
Thanks for the suggestion. Unfortunately it doesn't work either.

Any other ideas?

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:Om**************@TK2MSFTNGP04.phx.gbl...
DJ,

I mean

If Combobox1.Text ="Normal" then instead of your code

If DropDownBox1.SelectedItem.Text = "Normal" Then

Cor
"DJ" <re***@cox.net> schreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
Correct me if I am wrong but ComboBox1.Text = "Normal" would set the
text in the box to Normal.

What I am trying to do is return the text value of whatever item is
selected so that when one imparticular item (Normal) is selected,
ComboBox6 will be disabled.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2*****************@TK2MSFTNGP03.phx.gbl...
> DJ,
>
> In my idea is the currenttext in a combobox is always the
> selectedtext.
> Combobox1.text = normal
>
> What do I miss?
>
> Cor
>
> "DJ" <re***@cox.net> schreef in bericht
> news:%2****************@TK2MSFTNGP02.phx.gbl...
>>I can make it work in Visual Web Developer 2005 with the following
>>syntax:
>>
>> If DropDownBox1.SelectedItem.Text = "Normal" Then
>> DropDownBox6.Enabled = False
>> Else
>> DropDownBox6.Enabled = True
>> EndIF
>>
>> I was hoping that the following would work in VB 2005 but so far I
>> have been unsuccessful in making it work.
>>
>> If ComboBox.SelectedItem.Text = "Normal" but there is no Text child
>> object for Selected Item.
>>
>> "Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
>> news:ef**************@TK2MSFTNGP04.phx.gbl...
>>> Can you show it how you would do it in aspnet, maybe is that the
>>> best traject to show it you in VBNet.
>>>
>>> Did you know by the way that the most active VB newsgroup is
>>>
>>> microsoft.public.dotnet.languages.vb
>>>
>>> Cor
>>>
>>> "news.microsoft.com" <re***@cox.net> schreef in bericht
>>> news:%2****************@TK2MSFTNGP04.phx.gbl...
>>>>I am new to this so bear with me.
>>>>
>>>> I have a set of combo boxes. Lets call them ComboBox1 and
>>>> ComboBox2.
>>>>
>>>> ComboBox1 items are pulled from a table. When a user selects a
>>>> certain item I want to disable ComboBox2. i can make this work in
>>>> Visual Web Developer, but have been unsuccessful in Visual Basic
>>>> 2005.
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Jun 19 '06 #9
Hello news.microsoft.com,

Set a breakpoint on your Combobox1.SelectedIndexChanged event. Then set
a watch on Combobox1 and Combobox1.SelectedItem.

The watch window will tell you all you need to know.

-Boo

I am new to this so bear with me.

I have a set of combo boxes. Lets call them ComboBox1 and ComboBox2.

ComboBox1 items are pulled from a table. When a user selects a certain
item I want to disable ComboBox2. i can make this work in Visual Web
Developer, but have been unsuccessful in Visual Basic 2005.

Jun 19 '06 #10
DJ
I set a breakpoint at the SelectedIndexChanged event and the text visualizer
for the Combobox.Selected Item just displays "" for any item that is
selected.

"GhostInAK" <gh*******@gmail.com> wrote in message
news:be*************************@news.microsoft.co m...
Hello news.microsoft.com,

Set a breakpoint on your Combobox1.SelectedIndexChanged event. Then set a
watch on Combobox1 and Combobox1.SelectedItem.

The watch window will tell you all you need to know.

-Boo

I am new to this so bear with me.

I have a set of combo boxes. Lets call them ComboBox1 and ComboBox2.

ComboBox1 items are pulled from a table. When a user selects a certain
item I want to disable ComboBox2. i can make this work in Visual Web
Developer, but have been unsuccessful in Visual Basic 2005.


Jun 19 '06 #11

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

Similar topics

2
by: ross kerr | last post by:
Hi all, I have a control that extends the ComboBox object. It updates the selected item based on what the user enters in the text area. In the OnLeave event of the combobox, the selected...
4
by: Beeeeeeeeeeeeves | last post by:
I have an ownerdrawn combo box which I am drawing with an image and some text, this is all working beautifully apart from the difference in the Brush I have to draw the background and the text with...
3
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can...
0
by: Doug | last post by:
This is a repost of an item that I still cannot resolve. I have 3 combo boxes. The first leads to the second to the third. When I have selected a value in the second box, the third box shows...
2
by: pmcguire | last post by:
OK. So I've been to http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp and learned a lot about what I might do with a datagrid. But I'm STILL not able to do what I want to do. I want to be able...
5
by: Brian | last post by:
I've setup a custom combobox control that allows a multikey selections. This lets the user enter key presses and the combo scrolls to the matching selection. I run into a bug when the user opens...
2
by: Don | last post by:
I've looked high and low for some code that will allow me to have a combobox with a flat borderstyle. I found a few examples, but nothing that was really usable for me. I had the following...
4
by: Jerad Rose | last post by:
I'm baffled by this -- is there not a typed object used for ComboBox Items? Best I can tell, all of the methods for ComboBox that accept an Item are of type Object. Why in the world is a...
8
by: =?Utf-8?B?RyBIdXN0aXM=?= | last post by:
This is the 2nd time posting so sorry for duplications. I am using VB.NT 2005 & a standard Combobox. I've been wracking my brain over this problem for a over a month & cannot seem to find a way to...
3
by: Gerrit | last post by:
Hi, I try to learn programming in c# with databinding controls. Now I have a problem with a ComboBox with the advanced properties for databinding, I want to set the DataSourceUpdateMode to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
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...
0
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,...
0
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...

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.