Re: ComboBox ItemData?
From: Ginny Caughey [MVP] (ginny.caughey.online_at_wasteworks.com)
Date: 10/19/04
- Next message: Ginny Caughey [MVP]: "Re: Problem calling webservice from CF"
- Previous message: Jared Bienz: "Re: Access to .NET Controls properties (in runtime mode) ??"
- In reply to: Tim Johnson: "ComboBox ItemData?"
- Next in thread: Tim Johnson: "Re: ComboBox ItemData?"
- Reply: Tim Johnson: "Re: ComboBox ItemData?"
- Reply: PeterB: "Re: ComboBox ItemData?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 19 Oct 2004 10:30:31 -0400
Tim,
I use the ArrayList of objects approach described by Alex. The objects I use
like this all have a property called DataObject that looks like this:
public Customer DataObject
{ get{return tnis;}}
so I can just set the ValueMember of the combo box to DataObject and get
back the data object itself.
-- Ginny Caughey .Net Compact Framework MVP "Tim Johnson" <tjohnson@high-point.com> wrote in message news:eU55kFatEHA.1404@TK2MSFTNGP11.phx.gbl... > I'm coming from MFC-land where a combobox had an ItemDataPtr property, > whereby you could stash away a ptr to some arbitrary object. Then when > the > user selected an item, you could fetch the object back based on the > selected > index. Is there anything comparable in C#? The only samples I've seen > show > them managing their own separate arraylist corresponding to the items in > the > combobox - yechh! > > -- > Tim Johnson > High Point Software > www.high-point.com > (503) 312-8625 > >
- Next message: Ginny Caughey [MVP]: "Re: Problem calling webservice from CF"
- Previous message: Jared Bienz: "Re: Access to .NET Controls properties (in runtime mode) ??"
- In reply to: Tim Johnson: "ComboBox ItemData?"
- Next in thread: Tim Johnson: "Re: ComboBox ItemData?"
- Reply: Tim Johnson: "Re: ComboBox ItemData?"
- Reply: PeterB: "Re: ComboBox ItemData?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|