Connecting Tech Pros Worldwide Help | Site Map

quick question on DDL?

Rudy
Guest
 
Posts: n/a
#1: Nov 19 '05
Hello all!

Have a quick question on drop down list. Need to make a year ddl, 1900 to
1987. Is there a quick way to do this. I'm not binding this, just loading it
in the items collection.

Thanks!!!

Rudy
Manohar Kamath
Guest
 
Posts: n/a
#2: Nov 19 '05

re: quick question on DDL?


you just create a simple loop:

for(int yearVal = 1900; yearVal <= 1987; yearVal++)
{
// cboYears is a ComboBox
cboYears.Items.Add(yearVal.ToString());
}

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com


"Rudy" <Rudy@discussions.microsoft.com> wrote in message
news:97DAEC4F-22A8-41D7-85A2-94FAE9AE12A4@microsoft.com...[color=blue]
> Hello all!
>
> Have a quick question on drop down list. Need to make a year ddl, 1900 to
> 1987. Is there a quick way to do this. I'm not binding this, just loading[/color]
it[color=blue]
> in the items collection.
>
> Thanks!!!
>
> Rudy[/color]


Rudy
Guest
 
Posts: n/a
#3: Nov 19 '05

re: quick question on DDL?


Thank You Manohar!!!

"Manohar Kamath" wrote:
[color=blue]
> you just create a simple loop:
>
> for(int yearVal = 1900; yearVal <= 1987; yearVal++)
> {
> // cboYears is a ComboBox
> cboYears.Items.Add(yearVal.ToString());
> }
>
> --
> Manohar Kamath
> Editor, .netWire
> www.dotnetwire.com
>
>
> "Rudy" <Rudy@discussions.microsoft.com> wrote in message
> news:97DAEC4F-22A8-41D7-85A2-94FAE9AE12A4@microsoft.com...[color=green]
> > Hello all!
> >
> > Have a quick question on drop down list. Need to make a year ddl, 1900 to
> > 1987. Is there a quick way to do this. I'm not binding this, just loading[/color]
> it[color=green]
> > in the items collection.
> >
> > Thanks!!!
> >
> > Rudy[/color]
>
>
>[/color]
Closed Thread