Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have question about timezone, i want to fill the dropdown with all timezone in world and when i select one of them i want to save the selected value of that dropdown, for that i use the code
C#
ReadOnlyCollection<TimeZoneInfo> timezoneInfo;
timezoneInfo = TimeZoneInfo.GetSystemTimeZones();
strTimezone = string.Join(";", from Time in timezoneInfo
select string.Format("{0}:{1}",
Time.Id, Time.DisplayName));

but with the help of that my dropdown is fill with only one timezone which is chennai kolkatta because my system has only one timezone which is chennai kolkatta that dropdown contain only one value, but i want all timezone for that what i do please help me as early as possible.
Posted
v2
Comments
Richard MacCutchan 8-Dec-12 5:17am    
You need to enumerate your collection to see all the timezones.

Set the datasource of your dropdown to the collection ...
this.comboBox1.DataSource = timezoneInfo;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900