Hello,
I can't seem to trap any Function keys while editing a cell on the radGridView. Could you provide any clues where I am going wrong? I have practically copied the code from your help documentation. If I press Ctrl+L then all works fine.
Regards
Terry
I can't seem to trap any Function keys while editing a cell on the radGridView. Could you provide any clues where I am going wrong? I have practically copied the code from your help documentation. If I press Ctrl+L then all works fine.
Regards
Terry
Public Class Form1 Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Me.KeyPreview = True Dim x As Boolean x = LogIntoSQL() If x = True Then Try myList = New BindingList(Of CompanyHistory)() LoadNewCompanyHistory() RadGridView1.DataSource = myList Catch ex As Exception MsgBox(ex.Message) End Try End If End Sub Private tbSubscribed As Boolean = False Private Sub radGridView1_CellEditorInitialized(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Dim tbEditor As RadTextBoxEditor = TryCast(Me.RadGridView1.ActiveEditor, RadTextBoxEditor) If Not tbEditor Is Nothing Then If (Not tbSubscribed) Then tbSubscribed = True Dim tbElement As RadTextBoxEditorElement = CType(tbEditor.EditorElement, RadTextBoxEditorElement) AddHandler tbElement.KeyDown, AddressOf tbElement_KeyDown End If End If End Sub Private Sub tbElement_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) If e.Control Then If e.KeyCode = Keys.F1 Then CType(sender, RadTextBoxEditorElement).Text = "F1" End If If e.KeyCode = Keys.F2 Then CType(sender, RadTextBoxEditorElement).Text = "F2" End If If e.KeyCode = Keys.L Then CType(sender, RadTextBoxEditorElement).Text = "LLLL" End If End If End Sub Public Sub New() ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. AddHandler RadGridView1.CellEditorInitialized, AddressOf radGridView1_CellEditorInitialized End SubEnd Class