Tuesday, July 23, 2013

To loop through the each record in a gridview in asp.net

VB.Net Code

If gv.Rows.Count > 0 Then
            For Each row As GridViewRow In gv.Rows
                Dim linkButton As LinkButton = row.FindControl("lnkDel")
                linkButton.Enabled = False
                linkButton.Attributes.Add("readonly", "readonly")
            Next
 End If

No comments:

Post a Comment