Cargando datos a DropdownList en columna de Gridview
Private Sub dgDataRetentionRules_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles dgDataRetentionRules.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = dgDataRetentionRules.EditIndex Then
Dim typeEditList As DropDownList = e.Row.FindControl("ddllayername") typeEditList.DataSource = GetValidLayers()
typeEditList.DataTextField = "PLLONGNAME"
typeEditList.DataValueField = "PLID"
typeEditList.SelectedValue = "mwi9005"
typeEditList.DataBind()
End If
End If
If (e.Row.RowType = DataControlRowType.Footer) Then
Dim typeEditList As DropDownList = e.Row.FindControl("ddllayername")
typeEditList.DataSource = GetValidLayers()
typeEditList.DataTextField = "PLLONGNAME"
typeEditList.DataValueField = "PLID"
typeEditList.DataBind()
typeEditList.SelectedValue = "mwi9005"
End If
End Sub
0 Response to "Cargando datos a DropdownList en columna de Gridview"
Publicar un comentario