In my treeview, after adding a fold, I want that row to be highlghted and in edit mode. So that user can enter name for new folder. I am able to focus the node but not set the row in edit mode.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Had exactly the same issue, here’s the code snips, requires a global variable to distinguish a regular click from an ‘I want to edit’ click:
First create a global variable
Put this code after you have created your node, this will trigger the editor (make sure you have flagged the grid for editing as well as the columns you want to edit.
Add an event to your treelist Click event, add this code
Add an event to your OnFocusedNodeChanged event, add this code
In the ShowingEditor event you want to put this code
If you have any actions in mouse clicks (for context menus, make sure to set fChanged to false as this will also trigger the editor.
Finally all you need to do is handle ValidateEditor and HiddenEditor with your code.
HTH