I answered my own question. Here's what I did to solve this:
1. Deleted the "selected value="<%# bind("driver") %>" from the
dropdownlist. (i did not have this code in my above posting)
2. Placed "Imports System.Data" at the top of my code page to
accomodate for the "DataRowVie w"
3. Entered the following code in my dropdownlist_da tabound. I got
this code from teh following website:
http://www.webswapp.com/codesamples/...s/default.aspx
(he has codebehind in C# or VB)
Protected Sub ddlTruckDrivers 1_DataBound(ByV al sender As Object,
ByVal e As System.EventArg s)
Dim ddl As DropDownList = DirectCast(send er, DropDownList)
'=== add an empty item on top of the list
Dim gvRow As GridViewRow = DirectCast(ddl. NamingContainer ,
GridViewRow)
'check to see if the item exists in the gridview, if it doesn't then
it will default to the first item in the dropdownlist
If Not gvRow.DataItem Is Nothing Then
Dim strDriver As String = DirectCast(gvRo w.DataItem,
DataRowView)("d river").ToStrin g
'be careful of the possibility that the value saved on
the database does not exist
'in the valid selections that are displayed on the list
ddl.ClearSelect ion()
Dim li As ListItem = ddl.Items.FindB yValue(strDrive r)
If Not li Is Nothing Then li.Selected = True
End If
End Sub
4. This small piece of data to set the value of the update parameter:
Protected Sub glTrucks_RowUpd ating(ByVal sender As Object, ByVal e
As System.Web.UI.W ebControls.Grid ViewUpdateEvent Args) Handles
glTrucks.RowUpd ating
e.NewValues("dr iver") =
CType(glTrucks. Rows(e.RowIndex ).FindControl(" ddlTruckDrivers 1"),
DropDownList).S electedValue
End Sub