When I select an item using radTreeView and press any key, I want to enter Editmode immediately.
Please let me know if there is any way.
1 Answer, 1 is accepted
0
Dinko | Tech Support Engineer
Telerik team
answered on 18 Jan 2023, 09:50 AM
Hi Jay,
To start the editing process of the selected node, you need to call the BeginEdit() method. You can check the Editing Nodes help article which further describes the editing functionality of the RadTreeView. In your case, you can subscribe to the KeyDown event of the RadTreeView and call the BeginEdit() of the RadTreeView.
publicForm1()
{
InitializeComponent();
radTreeView1.AllowEdit = true;
this.radTreeView1.KeyDown += RadTreeView1_KeyDown;
}
privatevoidRadTreeView1_KeyDown(object sender, KeyEventArgs e)
{
// You can add custom logic to check which key is pressed
radTreeView1.BeginEdit();
}
I am not familiar with your requirements, but what I can suggest is to add custom logic that checks which key is pressed and enter the edit mode in only those scenarios.
I hope that my reply is helpful.
Regards,
Dinko | Tech Support Engineer
Progress Telerik