How to add Items with value and display into comboboxes?
Posted
by hatem gamil
on Stack Overflow
See other posts from Stack Overflow
or by hatem gamil
Published on 2010-05-17T12:27:11Z
Indexed on
2010/05/17
12:30 UTC
Read the original article
Hit count: 212
winforms
hi all i have a combo box that have a datatable dt as datasource
Code:
dt = new DataTable();
dt = DAL.ExecuteProc("SP_GetCashiers");
CashierDDL.DataSource = dt;
CashierDDL.DisplayMember = "Cashier_Name";
CashierDDL.ValueMember = "Id";
just like that ,,note::CashierDDL is my combobox
i want to know how can add an item to my combobox with value to assign it to sqlParameter to send this parameter to another storedProc to get data based on seleted item from the combobox
i am working with vs2008 ,,winforms
thnx
© Stack Overflow or respective owner