472,128 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,128 software developers and data experts.

dropdown item ID


I am using this code to populate data into combobox but i was just
thinking how can i assign an id to each item in the dropdown list like
the primary id for example because i want to save both id and name of
the company..

// fill the insurance company;

VDBAdapter.SelectCommand = new VistaDBCommand("SELECT account_name AS
insurance_account FROM accounts WHERE account_type = 'INSURANCE' ORDER
BY account_name", VDBConnection);


VDBAdapter.Fill(VDBDataset, "insurance_account");
//put the data from the dataset into the combobox

DataTable tblInsuranceCompany = VDBDataset.Tables["insurance_account"];

if (oDataTable == null)

throw new Exception("BoxCustomers table not found in

foreach (DataRow oRow in tblInsuranceCompany.Rows)




Many Thanks,
Jassim Rahma

*** Sent via Developersdex http://www.developersdex.com ***
Nov 25 '05 #1
0 856

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by San Smith | last post: by
2 posts views Thread by Mike Collins | last post: by
5 posts views Thread by =?Utf-8?B?Y2hlY2tyYWlzZXJAY29tbXVuaXR5Lm5vc3BhbQ== | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.