Link to home
Start Free TrialLog in
Avatar of chokka
chokkaFlag for United States of America

asked on

Vb.Net ComboBox Selection

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.
Avatar of Mike Eghtebas
Mike Eghtebas
Flag of United States of America image

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
Avatar of chokka

ASKER

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.
Avatar of chokka

ASKER

How to dynamically populate or show records in combobox ?
ASKER CERTIFIED SOLUTION
Avatar of Mike Eghtebas
Mike Eghtebas
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chokka

ASKER

Thanks