If I understand your question correctly, on the ItemDataBound event you
could do something like this:
If e.Item.ItemType = ListItemType.Ed itItem Then
'look for the ddlWeekDay dropdown
Dim ddlWeekDay As DropDownList =
CType(e.Item.Fi ndControl("ddlW eekDay"), DropDownList)
'populate the dropdown values
Dim mySortedList As New System.Collecti ons.SortedList
Dim Item As DictionaryEntry
mySortedList("0 ") = "Sunday"
mySortedList("1 ") = "Monday"
mySortedList("2 ") = "Tuesday"
mySortedList("3 ") = "Wednesday"
For Each Item In mySortedList
Dim newListItem As New ListItem
newListItem.Tex t = Item.Value
newListItem.Val ue = Item.Key
ddlWeekDay.Item s.Add(newListIt em)
Next
'set the current value held in the database
Dim currentWeekDay As String =
DataBinder.Eval (e.Item.DataIte m, "WeekDay")
Dim li As ListItem =
ddlWeekDay.Item s.FindByValue(c urrentWeekDay.T oString())
If Not (li Is Nothing) Then
li.Selected = True
End If
Hope this helps.
Kat
*** Sent via Developersdex
http://www.developersdex.com ***