Telerik - RadGridView CurrentRowChanged event

If you need to place code behind a WinForms RadGridView that does something when the grid row changes, the CurrentRowChanged event is the place to do it. This article is a short code example of how to code that event
                       
Private Sub RadGridView1_CurrentRowChanged(sender As System.Object, e As Telerik.WinControls.UI.CurrentRowChangedEventArgs) Handles RadGridView1.CurrentRowChanged
 
    'make sure that we're on a data row
    If TypeOf (e.CurrentRow) Is GridViewDataRowInfo Then
        'get a reference to the row
        Dim r As GridViewDataRowInfo = e.CurrentRow
 
        'get the value of one of the grid columns
        Dim strHoldType As String = r.Cells("vchrHoldType").Value
 
        'business logic
        If r.Cells("vchrHoldType").Value = "PRICING" Then
            btnRelease.Enabled = True
        Else
            btnRelease.Enabled = False
        End If
    End If
 
End Sub

RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences