Click here to Skip to main content
11,569,923 members (57,675 online)
Click here to Skip to main content

Tagged as

Bind Enum data to Dropdown List By Sorting

, 30 Dec 2010 CPOL 2.2K 1
here is what I do to iterate through enumpublic static ABC(Type enumType){ foreach (Enum e in Enum.GetValues(enumType)) { int tvalue = Convert.ToInt32(e); string tname = e.ToString(); }}


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

26 Dec 2010
John Simmons / outlaw programmer
Can't you just call Enum.GetNames(), and then bind to the collection returned by that method?
29 Dec 2010
2 alternatives  


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


About the Author

Xmen WK
India India
No Biography provided

| | Privacy | Terms of Use | Mobile
Web04 | 2.8.150624.2 | Last Updated 30 Dec 2010
Article Copyright 2010 by Xmen WK
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid