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 "DataRowView"
3. Entered the following code in my dropdownlist_databound. 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 ddlTruckDrivers1_DataBound(ByVal sender As Object,
ByVal e As System.EventArgs)
Dim ddl As DropDownList = DirectCast(sender, 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(gvRow.DataItem,
DataRowView)("driver").ToString
'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.ClearSelection()
Dim li As ListItem = ddl.Items.FindByValue(strDriver)
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_RowUpdating(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles
glTrucks.RowUpdating
e.NewValues("driver") =
CType(glTrucks.Rows(e.RowIndex).FindControl("ddlTr uckDrivers1"),
DropDownList).SelectedValue
End Sub