Re: DropDownList and ListItem
From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 12/08/04
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: DropDownList and ListItem"
- Previous message: Nicholas Paldino [.NET/C# MVP]: "Re: CWnd::RunModalLoop in C#"
- In reply to: Fabio Negri Cicotti [MCP]: "DropDownList and ListItem"
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: DropDownList and ListItem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 8 Dec 2004 09:10:01 -0500
Fabio,
The DropDownList doesn't exist in Windows Forms. I assume you mean the
ComboBox control. In this case, you would use the Items property, which is
the indexer (I believe) for the class.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"Fabio Negri Cicotti [MCP]" <cicotti@hotmail.com> wrote in message
news:e$so8vS3EHA.1300@TK2MSFTNGP14.phx.gbl...
> Sorry for my silly question...
>
> in the same way we can define in a DropDownList the "ValueMember" and
> "Display Member" when we bind a DatasSource, how could I do it using a
> hard-code fixed datasource (without neither access the DB or create a
> DataTable)?
>
> To be as clear as possible, if I want to fill a DropDownList with the
> following data (not comming from database, but from my source-code), how
> do I do?
>
> ID - Desciption
> 3 - Desc 3
> 6 - Desc 6.1
> 7 - Desc 7
>
> With ASP.NET I use ListItem but it seems don't work with windows forms.
>
>
> Kind regards,
>
> Fabio Negri Cicotti
> Software Engineer
>
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: DropDownList and ListItem"
- Previous message: Nicholas Paldino [.NET/C# MVP]: "Re: CWnd::RunModalLoop in C#"
- In reply to: Fabio Negri Cicotti [MCP]: "DropDownList and ListItem"
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: DropDownList and ListItem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading