GridView根据某行的内容显示或隐藏Edit按钮

 

Protected Sub gdv_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles gdv.RowDataBound
        If e.Row.RowType = DataControlRowType.DataRow Then
            If CType(e.Row.FindControl("lblVerifiedBy"), Label).Text.Trim() <> "" Then
                e.Row.Cells(0).Text = ""
            End If
        End If
    End Sub

GridView_ShowOrHide_Edit_Accordingto_Content

GridView_ShowOrHide_Edit_Accordingto_Content2

你可能感兴趣的:(GridView)