Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. WPF
  4. WPF: WPF Toolkit Datagrid. Capturing Key board events

WPF: WPF Toolkit Datagrid. Capturing Key board events

Scheduled Pinned Locked Moved WPF
csharpwpfquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sameercodes
    wrote on last edited by
    #1

    How can we capture the Keypress event and the pressed key, on a WPF toolkit datagrid? I need to capture the F9 key, when the user is focussed on a particular column. Plus, can anybody suggest a good site to study the WPF toolkit datagrid? The basic CRUD operations need to be implemented. I am totally new to .NET 3.5. Thanks Folks!!!

    H A 2 Replies Last reply
    0
    • S sameercodes

      How can we capture the Keypress event and the pressed key, on a WPF toolkit datagrid? I need to capture the F9 key, when the user is focussed on a particular column. Plus, can anybody suggest a good site to study the WPF toolkit datagrid? The basic CRUD operations need to be implemented. I am totally new to .NET 3.5. Thanks Folks!!!

      H Offline
      H Offline
      hhrafn
      wrote on last edited by
      #2

      I'm having a similar problem; I need to implement a double-click on the datagrid, while using MVVM. So I don't want to have any event handling code in the code-behind. Preferably binding to a command property in the VM. I've searched the internet all ower and still cannot find a suitable solution. Is there somehow a way (for me and sameercodes) to handle these keyboard and mouse events with behaviours or gestures AND bind to a command :confused: Thanks. :)

      1 Reply Last reply
      0
      • S sameercodes

        How can we capture the Keypress event and the pressed key, on a WPF toolkit datagrid? I need to capture the F9 key, when the user is focussed on a particular column. Plus, can anybody suggest a good site to study the WPF toolkit datagrid? The basic CRUD operations need to be implemented. I am totally new to .NET 3.5. Thanks Folks!!!

        A Offline
        A Offline
        ausadmin
        wrote on last edited by
        #3

        To learn about DataGrid, I suggest looking at "WPF DataGrid Practical Examples" [^]. To respond to the F9 key I expect you can use the KeyDown event, but I have not tried this. To handle such events in a MVVM pattern - that is tricky and not something I have solved. So far I have taken the easy path and simply used codebehind. I suspect the answer might be in "WPF : If Heineken did MVVM Frameworks Part 2 of n" [^] - View Lifecycle Events - but I have not yet properly followed this or tried it. I hope that might be helpful. Tim

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups