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

Search menu items by typing in chars

1 Answer 24 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Jannik
Top achievements
Rank 1
Jannik asked on 18 Mar 2015, 09:35 AM
I have the following XAML-code:


<telerik:RadMenu Grid.Row="2"
                         Grid.Column="1"
                         Margin="-6,0,0,0"
                         VerticalAlignment="Center"
                         Background="Transparent"
                         ClickToOpen="True"
                         IconColumnWidth="0">
            <telerik:RadMenuItem x:Name="KontextRadMenuItem" StaysOpenOnClick="True">
                <telerik:RadMenuItem.Header>
                    <TextBlock Foreground="DarkBlue" Text="{Binding SelectedKontextText}" />
                </telerik:RadMenuItem.Header>
                <telerik:RadMenuGroupItem IsCheckable="True"
                                          ItemTemplate="{StaticResource MenuTemplate}"
                                          ItemsSource="{Binding KontextAuswahlList}"
                                          ScrollViewer.VerticalScrollBarVisibility="Auto"
                                          MaxHeight="300"
                                          Padding="-5,-5,-5,-5"
                                          StaysOpenOnClick="True"
                                          cal:Message.Attach="[Event Checked] = [Action KontextHinzufuegen($source,$eventArgs)]; [Event Unchecked] = [Action KontextEntfernen($source,$eventArgs)];[Event KeyDown] = [Action KontextAuswahlKeyDown($source,$eventArgs)]" />
                
            </telerik:RadMenuItem>
        </telerik:RadMenu>

My menu has around 300 menu items. How do I let the user type some chars, e.g. just the letter P, to jump to the first occurance starting with a P? Is there SearchPath, which i can set to SelectedContextText? Or something similar?

1 Answer, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 23 Mar 2015, 08:55 AM
Hi Jannk,

I'm afraid that the control doesn't support the desired functionality. What you can try would be to use RadListBox in RadMenuGroupItem and use its TextSearchMode to navigate through the items. However this suggestion might not be suitable for every scenario (for example: if you have nested MenuItems inside of the GroupItem).

Hope this helps.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Menu
Asked by
Jannik
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or