5 Answers, 1 is accepted
0
Hi Peter,
Yes - you should update your ItemsSource manually when editing. Just handle the Edited (or PreviewEdited) event and modify your collection manually. TreeView can not update the underlying ollection automatically. If you have any idea for easing this - just let us know.
Thanks!
Regards,
Valentin.Stoychev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Yes - you should update your ItemsSource manually when editing. Just handle the Edited (or PreviewEdited) event and modify your collection manually. TreeView can not update the underlying ollection automatically. If you have any idea for easing this - just let us know.
Thanks!
Regards,
Valentin.Stoychev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Luay
Top achievements
Rank 1
answered on 24 Oct 2008, 04:17 PM
Is it possible to provide an Editing Template? It will be great if we can provide our own control template for edit mode. We can setup databinding to update our items directly.
The DataGrid is a good example. It provides a CellEditingTemplate that we can override to handle edit mode. Something like TreeItemEditingTemplate will be nice.
Thanks,
Luay
The DataGrid is a good example. It provides a CellEditingTemplate that we can override to handle edit mode. Something like TreeItemEditingTemplate will be nice.
Thanks,
Luay
0
Hi Luay,
This is a good idea - we will try to address it with the next update of the control ( not sure if we will be able to do it for Q3 release).
Thanks for the feedback.
All the best,
Valentin.Stoychev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
This is a good idea - we will try to address it with the next update of the control ( not sure if we will be able to do it for Q3 release).
Thanks for the feedback.
All the best,
Valentin.Stoychev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Luay
Top achievements
Rank 1
answered on 24 Oct 2008, 09:37 PM
Thanks Valentin for your response.
What will be your advice to control editing behaviour for now?
I've seen on another thread a suggestion to override the RadTreeViewItem control template but it is not clear to me how can we achieve smooth editing behaviour.
The current control template has an EditElementContainer, which is a Border that contains a TextBox ("EditElement"). Is it possible to provide an alternate template?
If I change the TextBox("EditElement") and provide more controls, let's say two TextBoxes. I want to allow the second TextBox to provide the same behaviour as the ("EditiElement") textbox. For example, pushing the enter key will commit the changes and go back to readonly mode. Maybe also fire the Edited event.
What will be your advice to control editing behaviour for now?
I've seen on another thread a suggestion to override the RadTreeViewItem control template but it is not clear to me how can we achieve smooth editing behaviour.
The current control template has an EditElementContainer, which is a Border that contains a TextBox ("EditElement"). Is it possible to provide an alternate template?
If I change the TextBox("EditElement") and provide more controls, let's say two TextBoxes. I want to allow the second TextBox to provide the same behaviour as the ("EditiElement") textbox. For example, pushing the enter key will commit the changes and go back to readonly mode. Maybe also fire the Edited event.
Any hints?
Luay
0
Hello Luay,
Sorry for the late response. Yes - you can override the control template, and to include any xaml controls into the "EditElementContainer". They will be displayed once the item is in the edit mode. You need to provide a textbox which has this name "EditiElement". Everything else can be custom.
Please let us know if you have any other questions.
Kind regards,
Valentin.Stoychev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Sorry for the late response. Yes - you can override the control template, and to include any xaml controls into the "EditElementContainer". They will be displayed once the item is in the edit mode. You need to provide a textbox which has this name "EditiElement". Everything else can be custom.
Please let us know if you have any other questions.
Kind regards,
Valentin.Stoychev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
