Flip GridViewColumn between CellTemplate and CellEditTemplate programmatically

3 posts, 0 answers
  1. Sterren
    Sterren avatar
    2 posts
    Member since:
    May 2013

    Posted 22 May 2013 Link to this post

    Hi,

    I want to be able to handle key events on the GridView that will flip a GridViewColumn between view mode and edit mode programmatically. How do I do this?

    Thanks, Sterren
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 27 May 2013 Link to this post

    Hello Sterren,

    It depends on what Keys you would like to use for this purpose. If the GridView does not handle those keys internally, then you can just subscribe for the KeyDown event of the GridView and invoke BeginEdit for it.

    If your key is special and the GridView already handles it, then you could create your own custom keyboard provider. Please refer to our online documentation for further details. You can define behavior for the keys you are interested in overriding the ProvideCommandsForKey method. 

    Regards,
    Didie
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Sterren
    Sterren avatar
    2 posts
    Member since:
    May 2013

    Posted 28 May 2013 Link to this post

    Thank you Didie, that did the trick! I created a keyboard command handler for our grid and that fixed the issue we were having.
Back to Top