New C1TreeView C1TreeViewEditMode.EditOnF2

Posted by: kbj on 2 April 2018, 11:31 am EST

    • Post Options:
    • Link

    Posted 2 April 2018, 11:31 am EST

    First off, the new c1treeview is spectacular! It is very fast, works as it should, and HIGHLY customize-able through CustomContentPresenter(s). Great work!

    I have noticed when the C1TreeViewEditMode is set to EditOnF2, the edit mode can be set by double clicking also. This is not desired since a double click should expand and collapse the node’s children.

    Is there a way to turn off double click to edit mode and retain F2 to edit mode?

    Many thanks

  • Posted 3 April 2018, 7:59 am EST

    Hello,

    Firstly, thank you for appreciating our efforts in improving the control.

    Now, regarding the requirement, we could see that setting C1TreeViewEditMode to EditOnF2, allows entering into edit on mouse DoubleClick. To change this behavior to your desired behavior, we found a way that uses C1TreeView.Tag, CellBeginEdit and mouse events.

    The approach is pretty simple, while entering in edit mode we check whether the edit was caused by mouse click or by keyboard, this is done by using C1TreeView’s Tag property. And if the edit was due to mouse we cancel the CellBeginEdit event.

    Please refer to attached sample application for complete implementation.

    Hope this helps.

    Regards,

    Ruchir AgarwalEditOnF2_C1TreeView.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels