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

Add static items to top of data bound listpicker

1 Answer 72 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.
Jason
Top achievements
Rank 2
Jason asked on 30 Oct 2011, 09:51 PM
Guys,

I have a RadListPicker on my form bound to an ObservableCollection.
<telerikInput:RadListPicker x:Name="SessionTypesLB" PopupHeader="Select Session Type" InlineModeThreshold="2" ItemsSource="{Binding SessionTypes}" Grid.Row="1" SelectionChanged="SessionTypesLB_SelectionChanged" >
    <telerikInput:RadListPicker.ItemTemplate>
        <DataTemplate>
            <StackPanel >
                <TextBlock Text="{Binding SessionName}" />
            </StackPanel>
        </DataTemplate>
    </telerikInput:RadListPicker.ItemTemplate>
    <telerikInput:RadListPicker.PopupItemTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding SessionName}" />
        </DataTemplate>
    </telerikInput:RadListPicker.PopupItemTemplate>
</telerikInput:RadListPicker>

The listis used in a master-detail solution. The RadListPicker is the master and a ListView contains the details. The RadListPicker SelectionChanged event is used to filter the contents of the details listbox. I should like to be able to remove all filtering by adding an "All" option to the top of the list.

Any thoughts?
Jason.

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 01 Nov 2011, 09:22 AM
Hi Jason,

Thank you for your question.

If I understand you correctly, you want to add some additional UI elements on top of a list picker, which is in Popup mode. In this case you can play with the PopupHeader and PopupHeaderTemplate properties and provide the desired layout. Additionally you can directly modify the ControlTemplate property of the control and change the visual tree that lies behind. This however would require more XAML.

Let me know whether this answers your question. If not could you please be a bit more specific what is the actual scenario you want to achieve. A screenshot would be very helpful.

Best wishes,
Georgi
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ListPicker
Asked by
Jason
Top achievements
Rank 2
Answers by
Georgi
Telerik team
Share this question
or