When i pressed F2 key for editing the node it will edit for second time Press or need to press and hold a sec

2 posts, 0 answers
  1. Runjith
    Runjith avatar
    26 posts
    Member since:
    Mar 2014

    Posted 25 Jul 2014 Link to this post

    Hi,

    I have implemented Keyboard Functionality for rename,When i press F2 key for editing the node it will edit for second press or need to press and hold a sec.

    Please find the below Code..

     void treeview_KeyDown(object sender, KeyEventArgs e)
            {
                   if(e.Key==Key.F2)
                    {
                        treeview.IsEditable = true;
                      //  e.Handled = true;
                    }              
                    }
           }
    Please help me ASAP.

    Regards,
    Ranjith
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 30 Jul 2014 Link to this post

    Hello Ranjith,

    I noticed that you actually turn the feature of editing the RadTreeViewItems on every time you press F2. Please note that enabling this feature once is enough. Once enabled, you will be able to edit RadTreeViewItems by pressing F2 out of the box. This is why I suggest setting the RadTreeView.IsEditable property to True and unsubscribing from the KeyDown event of the RadTreeView.

    Please give this approach a try and let us know if you need any further assistance.

    Regards,
    Pavel R. Pavlov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top