Solved

Vb.Net ComboBox Selection

Posted on 2015-02-05
5
228 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
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…

785 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