Are you blogging on PH? Get your free blog.

C# & VB.NET School Support

Moderators: None (Apply to moderate this forum)
Number of threads: 117
Number of posts: 204

This Forum Only
Post New Thread

Report
How to enable a list box from a combobox in C#? Posted by achilleas22 on 28 Dec 2008 at 10:07 AM
Hello everybody. I'm new in C# and i have a question. What i want to do is to enable a listbox from a combobox. Let me give you an example so you can understand!!!

Lets say that the combobox has these values:1,2,3
I want when the user chooses the 2 a listbox to be enabled with information about 2. If he chooses the 1 a listbox to be enabled with information about 1.

Can somebody help me???

Thanks and merry Christmas!!!!!!!
Report
Re: How to enable a list box from a combobox in C#? Posted by Brutes on 16 Jan 2009 at 1:33 AM
Hi,

Do you populate the listbox from a Database?
Report
Re: How to enable a list box from a combobox in C#? Posted by s_sreenath on 16 Jan 2009 at 4:20 AM
Use the Combobox's selectedindexchanged event. Read the value of the selected value and use that and then display or enable the listbox of you desire. If you are using in asp.net, kindly let me know i can post some sample code here.
"Always Smile :)"



 
Popular resources and forums for programmers on Programmersheaven.com
Assembly, Basic, C, C#, C++, Delphi, Java, JavaScript, Pascal, Perl, PHP, Python, Ruby, Visual Basic
© Copyright 2009 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin. Read the latest words from the publisher here.
Be the first to sign up for Lars Hagelin’s In-depth Outsourcing Newsletter here.
bootstrapLabs Logo A bootstrapLabs project.