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

Multiple item container templates

1 Answer 35 Views
JumpList
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paulo Morgado
Top achievements
Rank 1
Paulo Morgado asked on 16 Aug 2012, 02:13 AM
Is it possible to have a data template selector to select the type of item container?

I'd like to have an option to choose from a list of details and a wrap panel with tiles.

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 16 Aug 2012, 08:21 AM
Hi Paulo,

Thank you for your question.

The DataTemplateSelector can be used only for setting a different template for the different items, but not for the panel that contains them. If you want to have a wrap panel, you can add a WrapVirtualizationStrategyDefinition as explained in RadDataBoundListBox's online documentation. Then you can try to simulate the desired behavior. For example, in the DataTemplateSelector, you can select a template that has a fixed width, that would not allow two items to be on the same row and this would look like a list of details. On the other hand, when you need the wrap panel with tiles, you can let the items size themselves and allow them to be on the same row.

I hope this information helps. Let me know if I can assist further.

Greetings,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
JumpList
Asked by
Paulo Morgado
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or