-
Trapping Keydown event in Datagrid
Hi !
I would like to be able to write an event handler for the DataGrid.KeyDown
event. I have set the Form.KeyPreview = True and have written the following
event handler:
Private Sub DataGrid_Test_KeyDown(ByVal sender As System.Object, ByVal e As
KeyEventArgs) Handles DataGrid_Test.KeyDown
MessageBox.Show("Key Pressed = " & e.KeyData.ToString())
End Sub
I would expect that when any key is pressed in the DataGrid, the messagebox
will be displayed. But this is not happening.
Any help would be appreciated.
Thanks,
Radhika
-
Re: Trapping Keydown event in Datagrid
Hi Radhika - There is a great example on syncfusion.com of how to handle
keystrokes in the datagrid:
http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q755q
Hope this helps!
-- Mike
VB .NET Team
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Radhika Nair" <radhikan@first-insight.com> wrote in message
news:3d4af9b4@10.1.10.29...
> Hi !
>
> I would like to be able to write an event handler for the DataGrid.KeyDown
> event. I have set the Form.KeyPreview = True and have written the
following
> event handler:
>
> Private Sub DataGrid_Test_KeyDown(ByVal sender As System.Object, ByVal e
As
> KeyEventArgs) Handles DataGrid_Test.KeyDown
>
> MessageBox.Show("Key Pressed = " & e.KeyData.ToString())
>
> End Sub
>
> I would expect that when any key is pressed in the DataGrid, the
messagebox
> will be displayed. But this is not happening.
>
> Any help would be appreciated.
>
> Thanks,
> Radhika
>
>
>
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks