Click here to Skip to main content
15,910,234 members
Home / Discussions / C#
   

C#

 
Questioncreate propertie list<> [modified] Pin
khaled_basher23-Jan-09 10:17
khaled_basher23-Jan-09 10:17 
AnswerRe: create propertie list<> Pin
DaveyM6923-Jan-09 10:20
professionalDaveyM6923-Jan-09 10:20 
GeneralRe: create propertie list<> Pin
khaled_basher23-Jan-09 10:35
khaled_basher23-Jan-09 10:35 
GeneralRe: create propertie list<> Pin
Guffa23-Jan-09 10:38
Guffa23-Jan-09 10:38 
GeneralRe: create propertie list<> Pin
khaled_basher23-Jan-09 10:51
khaled_basher23-Jan-09 10:51 
GeneralRe: create propertie list<> Pin
DaveyM6923-Jan-09 11:10
professionalDaveyM6923-Jan-09 11:10 
GeneralRe: create propertie list<> [modified] Pin
khaled_basher23-Jan-09 11:32
khaled_basher23-Jan-09 11:32 
GeneralRe: create propertie list<> Pin
DaveyM6923-Jan-09 11:52
professionalDaveyM6923-Jan-09 11:52 
QuestionSAPI 5 Dictation, how do I define a limited domain grammar? Pin
brossen23-Jan-09 9:48
brossen23-Jan-09 9:48 
QuestionDeploying Database Pin
ziwez023-Jan-09 9:21
ziwez023-Jan-09 9:21 
AnswerRe: Deploying Database Pin
EliottA23-Jan-09 9:23
EliottA23-Jan-09 9:23 
GeneralRe: Deploying Database PinPopular
User 665823-Jan-09 9:57
User 665823-Jan-09 9:57 
JokeRe: Deploying Database Pin
PIEBALDconsult23-Jan-09 12:58
mvePIEBALDconsult23-Jan-09 12:58 
GeneralRe: Deploying Database Pin
ziwez016-Feb-09 21:16
ziwez016-Feb-09 21:16 
AnswerRe: Deploying Database Pin
Ennis Ray Lynch, Jr.23-Jan-09 9:47
Ennis Ray Lynch, Jr.23-Jan-09 9:47 
AnswerRe: Deploying Database [modified] Pin
PIEBALDconsult23-Jan-09 13:05
mvePIEBALDconsult23-Jan-09 13:05 
AnswerRe: Deploying Database Pin
Alex Casals23-Jan-09 23:32
professionalAlex Casals23-Jan-09 23:32 
QuestionC# Populate Multi column (2) combobox with existing dataset (hide record #) Pin
Wheels01223-Jan-09 9:13
Wheels01223-Jan-09 9:13 
AnswerRe: C# Populate Multi column (2) combobox with existing dataset (hide record #) Pin
DaveyM6923-Jan-09 9:16
professionalDaveyM6923-Jan-09 9:16 
GeneralRe: C# Populate Multi column (2) combobox with existing dataset (hide record #) Pin
Wheels01223-Jan-09 9:29
Wheels01223-Jan-09 9:29 
GeneralRe: C# Populate Multi column (2) combobox with existing dataset (hide record #) Pin
DaveyM6923-Jan-09 10:03
professionalDaveyM6923-Jan-09 10:03 
GeneralRe: C# Populate Multi column (2) combobox with existing dataset (hide record #) Pin
Wheels01226-Jan-09 1:32
Wheels01226-Jan-09 1:32 
GeneralRe: C# Populate Multi column (2) combobox with existing dataset (hide record #) Pin
Wheels01228-Jan-09 2:05
Wheels01228-Jan-09 2:05 
Hi Dave.

I have the following code:

ds = d.GeneralDropDown("Dept");

foreach (DataRow dr in ds.Tables[0].Rows)
{
//cboDeptID.Items.Add(dr[constrDeptID].ToString());
//cboDepartment.Items.Add(dr[constrDeptID].ToString() + " " + dr[constrDeptColumn].ToString());
cboDepartment.Items.Add(dr[constrDeptColumn].ToString());
cboDepartment.DisplayMember = dr[constrDeptColumn].ToString();
cboDepartment.ValueMember = dr[constrDeptID].ToString();
}

private void cboDeptID_SelectedIndexChanged(object sender, EventArgs e)
{
//ds = new DataSet();
//ds = d.FillDataGrid(this.cboDepartment,this.cboAcronym);
MessageBox.Show(this.cboDepartment.ValueMember);
MessageBox.Show(this.cboDepartment.DisplayMember);
}

Am I using the DisplayMemeber and ValueMember correctly? The combobox is poppulated, but the MessageBoxes don't come up when the value in the combobox changes.

Any ideas? WHEELS
GeneralRe: C# Populate Multi column (2) combobox with existing dataset (hide record #) Pin
DaveyM6928-Jan-09 7:08
professionalDaveyM6928-Jan-09 7:08 
GeneralRe: C# Populate Multi column (2) combobox with existing dataset (hide record #) Pin
Wheels01228-Jan-09 8:37
Wheels01228-Jan-09 8:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.