This is a migrated thread and some comments may be shown as answers.

[Solved] Using ItemEditTemplateSelector

1 Answer 97 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dan
Top achievements
Rank 1
Dan asked on 06 Jul 2009, 03:59 PM
Hello,

I have a treeview that is successfully using a data template selector (closely mimics your hierarchical templates example), and I saw with the new release there is a property for an item edit template selector.  I basically duplicated my current data templates and selector and applied it to the treeview and it doesn't work.  If i individually set the ItemEditTemplate property to any of the templates it works, but it appears that the edit data template selector class never fires the SelectTemplate method.  Is there anything special that needs to be in place to make this feature work correctly?

Thanks in advance,

Lars Solberg

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Miroslav
Telerik team
answered on 07 Jul 2009, 06:01 AM
Hi Lars,

The ItemEditTemplateSelector will be used if there is no ItemEditTemplate. (in a similar way to the ItemTemplate and ItemTemplateSelector).

We have provided a default ItemEditTemplate that works as the TextBox that used to appear before these properties were introduced.

So in order to use the ItemEditTemplateSelector, you need to set the ItemEditTemplate to null. In code this is trivial, in xaml you can do it like so: ItemEditTemplate="{x:Null}"

I am sorry that we did not make this clearer in the documentation and examples.

Does this work for you?

All the best,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
TreeView
Asked by
Dan
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Share this question
or