1
I have the following problem deleting a line from asp:gridview.
When I leave the code(key) visible="false" in the gridview, the value returned in my variable key comes Empty. But when I let visible="true" the function takes the correct value, someone knows a solution to take the value even with the visible="false" of my key?
Protected Sub gvLivros_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles gvLivros.RowCommand
    Dim objLivros As New ClasseLivros
    If e.CommandName = "Excluir" Then
        Dim index As Integer = Integer.Parse(DirectCast(e.CommandArgument, String))
        Dim chaveDelete = gvLivros.Rows(index).Cells(0).Text
        objLivros.ExcluirLivro(Convert.ToInt32(chaveDelete))
    End If
End Sub
Managed to solve the problem?
– stderr
It worked perfectly dude, vlw!!!
– WellDotCom
I am happy to have helped :). If possible mark the answer as accepted.
– stderr