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

Listpicker window mode displays both key and value of bound items source

3 Answers 76 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.
IDispose
Top achievements
Rank 1
IDispose asked on 19 Dec 2010, 03:12 AM
Hi
I am trying to use RadListPicker and bind it to a Dictionary<int, string>

The Picker control itself display the selected value correctly. I have set the DisplayMemberPath = "Value"

My Dictionary had the following items

1 Sunday
2 Monday
3 Tuesday
etc
When I click inside the list picker, the windows with values to pick is displayed but it displays

[1, Sunday]
[2, Monday]
etc

How do I get it to display only
Sunday
Monday etc?

Thanks

3 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 20 Dec 2010, 11:11 AM
Hello Ramesh Sringeri,

Thank you for reporting this. It is a bug in the control implementation.

The internally used listbox which is displayed in the window is not respecting the DisplayMemberPath property. To fix this you can edit the control template and to declare a template binding for the DisplayMemberPath property like that:

<telerikPrimitives:RadSelector x:Name="PopupList"
                                                              Background="{StaticResource PhoneChromeBrush}"
                                                              HorizontalAlignment="Stretch" 
                                                              VerticalAlignment="Stretch"
                                                              FontSize="{TemplateBinding FontSize}"
                                                              Header="{TemplateBinding PopupHeader}"
                                                              DisplayMemberPath="{TemplateBinding DisplayMemberPath}"
                                                              HeaderTemplate="{TemplateBinding PopupHeaderTemplate}"
                                                              HeaderStyle="{TemplateBinding PopupHeaderStyle}"/>

The other option would be to set the source of the list picker declaratively.

We alredy fixed this internally - if you need the fix before the next release - please let us know and we will provide you with an internal build.

Thank you once again for the feedback! Please let us know if you have any other comments on the controls.

I updated your telerik points.

Greetings,
Valentin.Stoychev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
IDispose
Top achievements
Rank 1
answered on 20 Dec 2010, 03:01 PM
Thanks for the response. I would love to get the latest internal bits as long as I can publish my Windows phone 7 app to that marketplace using these bits.

0
Deyan
Telerik team
answered on 23 Dec 2010, 09:43 AM
Hello Ramesh,

Thanks for writing back.

We will be able to provide you with an internal build of our controls in the beginning of January 2011. By that time you could use the workaround my colleague Valentin shared with you.

Do not hesitate to get back to us in case you have further questions or need assistance.

Regards,
Deyan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ListPicker
Asked by
IDispose
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
IDispose
Top achievements
Rank 1
Deyan
Telerik team
Share this question
or