Hi,
Can anybody give me the code to bind a comboBox in to a 2D array, in C#.
Also tell me if thats possible.
Regards,
Saurabh
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sebastian BanzPosted Jun 29, 2006, 8:48 AM
public
class ComboBoxItem{private string entry;
private string tag;
public ComboBoxItem(string entry, string tag){
this.entry = entry;
this.tag=tag;
} public string Entry{
get{
return this.entry;
}
} public string Tag{
get{
return this.tag;
}
}
public override string ToString(){
return entry;
}
}
Important is the ToString() Method, because the result will be shown in the comboBox.
Do you understand the idea?