Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to sort in desc order SortedList 1

Status
Not open for further replies.

yosie2007

Technical User
Jun 23, 2007
46
US
Hi,
How can I sort this in desc. order like Q4-2007, Q3-2007....like that. thanks



Sub QuarterSelector()

Dim QSelector As SortedList
QSelector = New SortedList
QSelector.Add("2003-1", " Q1-2003")
QSelector.Add("2003-2", " Q2-2003")
QSelector.Add("2003-3", " Q3-2003")
QSelector.Add("2003-4", " Q4-2003")
QSelector.Add("2004-1", " Q1-2004")
QSelector.Add("2004-2", " Q2-2004")
QSelector.Add("2004-3", " Q3-2004")
QSelector.Add("2004-4", " Q4-2005")
QSelector.Add("2005-1", " Q1-2005")
QSelector.Add("2005-2", " Q2-2005")
QSelector.Add("2005-3", " Q3-2005")
QSelector.Add("2005-4", " Q4-2005")
QSelector.Add("2006-1", " Q1-2006")
QSelector.Add("2006-2", " Q2-2006")
QSelector.Add("2006-3", " Q3-2006")
QSelector.Add("2006-4", " Q4-2006")
QSelector.Add("2007-1", " Q1-2007")
QSelector.Add("2007-2", " Q2-2007")
QSelector.Add("2007-3", " Q3-2007")
QSelector.Add("2007-4", " Q4-2007")


QSelector.Add("", "--Quarters--")
ddlQuarter.DataSource = QSelector
ddlQuarter.DataValueField = "Key"
ddlQuarter.DataTextField = "Value"
ddlQuarter.DataBind()

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top