Multiple item container templates

Thread is closed for posting
2 posts, 0 answers
  1. Paulo Morgado
    Paulo Morgado avatar
    8 posts
    Member since:
    Jan 2010

    Posted 15 Aug 2012 Link to this post

    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.
  2. Todor
    Todor avatar
    798 posts

    Posted 16 Aug 2012 Link to this post

    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.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top