This is a migrated thread and some comments may be shown as answers.

GridButtonColumn Not Fully Disabled

1 Answer 27 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Neil N
Top achievements
Rank 1
Iron
Veteran
Iron
Neil N asked on 06 Feb 2014, 05:07 PM
Version 2010.3.1317.20 (it's a .NET 2.0 site)

Protected Sub grdMaintReceived_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles grdMaintReceived.ItemDataBound
    If TypeOf e.Item Is GridDataItem Then
        Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
        Dim deactivated As Boolean = DirectCast(item("deactivated").FindControl("checkDeactivated"), CheckBox).Checked
        Dim contractBtn As LinkButton = DirectCast(item("service_provider_name").Controls(0), LinkButton)
        If deactivated Then
            contractBtn.Enabled = False
        End If
    End If
End Sub

This code removes the underline from the links but the user can mouse over the text, making the underline come back and click the button.  How can I stop this?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Feb 2014, 06:42 AM
Hi Neil,

Please try the following code snippet:

VB:
Protected Sub RadGrid1_ItemDataBound(sender As Object, e As GridItemEventArgs)
  If TypeOf e.Item Is GridDataItem Then
    Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
    Dim check As CheckBox = DirectCast(item.FindControl("checkDeactivated"), CheckBox)
    Dim contractBtn As LinkButton = DirectCast(item("service_provider_name").Controls(0), LinkButton)
    If check.Checked Then
        contractBtn.Enabled = False
    End If
 End If
End Sub

Thanks,
Princy
Tags
Grid
Asked by
Neil N
Top achievements
Rank 1
Iron
Veteran
Iron
Answers by
Princy
Top achievements
Rank 2
Share this question
or