Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Vb.Net ComboBox Selection

Posted on 2015-02-05
5
Medium Priority
?
233 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 34

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 34

Accepted Solution

by:
Mike Eghtebas earned 2000 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

Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

715 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