Solved

Vb.Net ComboBox Selection

Posted on 2015-02-05
5
227 Views
Last Modified: 2015-02-11
In Vb.Net, Combobox - We have two row of records. Can i set to display one row of record

Lets say , combobox has
id     value
100    Computer
200    Laptop

On a certain condition, i need to show only laptop value. But in other conditions, combobox can show all the values.

Is there a way to set the Field.
0
Comment
Question by:chokka
  • 3
  • 2
5 Comments
 
LVL 33

Expert Comment

by:Mike Eghtebas
ID: 40591674
CmboBox1.ValueMember = "id"; //never visible
CmboBox1.DisplayMember = "Value"; //always visible

If you have to have both, depending on your application, you maybe able to use:

1. Two combo boxes side by side
2. Have a Listview control
0
 

Author Comment

by:chokka
ID: 40591747
I have only one combobox. My combobox has two row of record.

I have to populate only one row or display only one row of record on a certain condition.

For other conditions, let the combobox can display two row of records.
0
 

Author Comment

by:chokka
ID: 40591754
How to dynamically populate or show records in combobox ?
0
 
LVL 33

Accepted Solution

by:
Mike Eghtebas earned 500 total points
ID: 40591770
Re:> I have only one combobox. My combobox has two row of record.

By modifying datasource, you can have:

d            NewValue
100    100, Computer
200    200, Laptop

re:. How to dynamically populate or show records in combobox ?

You need to show some code. It is impossible to work with nothing.
0
 

Author Closing Comment

by:chokka
ID: 40604811
Thanks
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now