'THIS IS THE CODE FOR THE ASSIGN COMMAND
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Assign1.Click
For Each gvr As GridViewRow In GridView1.Rows
If gvr.RowType = DataControlRowType.DataRow Then
Dim strID As String = GridView1.DataKeys(gvr.RowIndex)("ID")
Dim analistaname As String = CType(gvr.FindControl("Dropdownlist1"), DropDownList).SelectedValue
' Call database update method with params
SqlDataSource1.UpdateParameters("ANALISTA").DefaultValue = analistaname
SqlDataSource1.Update()
End If
Next
End Sub
|