Solved

Vb.Net ComboBox Selection

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

A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?

Question has a verified solution.

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

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 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 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 …

615 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