Display Selected Items with default Template

3 posts, 1 answers
  1. Nino
    Nino avatar
    19 posts
    Member since:
    Apr 2012

    Posted 21 Jul 2013 Link to this post

    Hi

    I'm trying to style a listpicker. I added the following dataTemplate:

    <telerikInput:RadListPicker.ItemTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding TagName}" />
        </DataTemplate>
    </telerikInput:RadListPicker.ItemTemplate>

    Now the Selection is fine (see Screenshot)

    Now it's fine if I just select one item. then it show the tagName. But the Problem is, that if i select more more then one item the overview in the textbox just shows the observableCollection item, instead of the tagName. 

    Anyone who know how i can set a default template for the multiple selection too?

    Thanks
    Nino


  2. Answer
    Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 23 Jul 2013 Link to this post

    Hello Nino,

    Thanks for writing and for the provided details.

    The reason for this behavior is the fact that the summary, which is built and shown in the inline portion of the listpicker when multiple items are selected, is generated by using the property defined on the DisplayMemberPath property of RadListPicker. In the other cases the ItemTemplate is used which you have already defined.

    Can you please try setting the DisplayMemberPath property to TagName and see if this fixes the issue?

    Thanks for your time.

    Regards,
    Deyan
    Telerik
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
  4. Nino
    Nino avatar
    19 posts
    Member since:
    Apr 2012

    Posted 23 Jul 2013 Link to this post

    Hi Deyan

    Thanks for your answer. That was exactly what was wrong.

    Thank you very much.
    Regards
    Nino
Back to Top