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

Display Selected Items with default Template

2 Answers 81 Views
ListPicker
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nino
Top achievements
Rank 1
Nino asked on 21 Jul 2013, 01:47 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Deyan
Telerik team
answered on 23 Jul 2013, 11:13 AM
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.
0
Nino
Top achievements
Rank 1
answered on 23 Jul 2013, 12:30 PM
Hi Deyan

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

Thank you very much.
Regards
Nino
Tags
ListPicker
Asked by
Nino
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Nino
Top achievements
Rank 1
Share this question
or