D
David C
I have the following code to show or hide some LinkButtons on my aspx page
and it does not appear to be working. The column named "VoidCheck" is a
bit/boolean column on the SQL database that is used to populate the
GridView.
When I select a row I want to show or hide the LinkButtons. Can anyone spot
what might be wrong with this, or have another event to accomplish this?
Thanks.
David
Protected Sub gvVendorChecks_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
gvVendorChecks.SelectedIndexChanged
' Get the currently selected row using the SelectedRow property.
Dim row As GridViewRow = gvVendorChecks.SelectedRow
Dim isvoid As Boolean =
Convert.ToBoolean(DataBinder.Eval(row.DataItem, "VoidCheck"))
If isvoid = True Then
' voided check selected so show the remove void button
LBtnRemoveVoid.CssClass = "Show"
LBtnVoidCheck.CssClass = "Hide"
Else
LBtnRemoveVoid.CssClass = "Hide"
LBtnVoidCheck.CssClass = "Show"
End If
End Sub
and it does not appear to be working. The column named "VoidCheck" is a
bit/boolean column on the SQL database that is used to populate the
GridView.
When I select a row I want to show or hide the LinkButtons. Can anyone spot
what might be wrong with this, or have another event to accomplish this?
Thanks.
David
Protected Sub gvVendorChecks_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
gvVendorChecks.SelectedIndexChanged
' Get the currently selected row using the SelectedRow property.
Dim row As GridViewRow = gvVendorChecks.SelectedRow
Dim isvoid As Boolean =
Convert.ToBoolean(DataBinder.Eval(row.DataItem, "VoidCheck"))
If isvoid = True Then
' voided check selected so show the remove void button
LBtnRemoveVoid.CssClass = "Show"
LBtnVoidCheck.CssClass = "Hide"
Else
LBtnRemoveVoid.CssClass = "Hide"
LBtnVoidCheck.CssClass = "Show"
End If
End Sub