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

Disabled items in

1 Answer 154 Views
JumpList
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bil Simser
Top achievements
Rank 1
Bil Simser asked on 02 Jan 2012, 12:38 AM
Hi there,

I'm using the jumplist in a pivot that contains a large list of items (pulled in from an outside service). I'm using the jumplist to provide an alpha jump to the starting letter. Everything works fine but all of the group pickers are enabled, even ones where there's no items available. I'd like the behavior so that letters without items are grayed out and disabled, I'm just not sure how to do this.

Here's the xaml for my jumplist in the pivot item:
<controls:PivotItem x:Name="VarietalPivotItem" Header="varietal">
    <Controls:RadJumpList x:Name="VarietalList" ItemsSource="{Binding Categories[1].Items}" ItemTap="OnItemTap">
        <Controls:RadJumpList.ItemTemplate>
            <DataTemplate>
                <TextBlock Margin="12,0,0,6" Text="{Binding Title}" Style="{StaticResource PhoneTextExtraLargeStyle}" />
            </DataTemplate>
        </Controls:RadJumpList.ItemTemplate>
        <Controls:RadJumpList.GroupPickerItemsPanel>
            <ItemsPanelTemplate>
                <telerikPrimitives:RadWrapPanel Margin="18,18,0,0" ItemWidth="111" ItemHeight="111" />
            </ItemsPanelTemplate>
        </Controls:RadJumpList.GroupPickerItemsPanel>
        <Controls:RadJumpList.GroupHeaderTemplate>
            <DataTemplate>
                <Border Margin="12,0,12,0" Background="{StaticResource PhoneAccentBrush}">
                    <TextBlock Text="{Binding}" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                </Border>
            </DataTemplate>
        </Controls:RadJumpList.GroupHeaderTemplate>
    </Controls:RadJumpList>
</controls:PivotItem>

And here's the C# that sets up the list:
private static void SetupJumpList(RadJumpList list)
        {
            list.IsAsyncBalanceEnabled = false;
 
            var groupPickerItems = new List<string>(32);
            groupPickerItems.AddRange(Alphabet.Select(c => new string(c, 1)));
            list.GroupPickerItemsSource = groupPickerItems;
 
            var group = new GenericGroupDescriptor<CategoryItemViewModel, string>(x => x.Title.Substring(0, 1).ToUpper());
            list.GroupDescriptors.Clear();
            list.GroupDescriptors.Add(group);
 
            list.GroupPickerItemTap += OnGroupPickerItemTap;
        }

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 03 Jan 2012, 09:10 AM
Hello Bil,

You can take a look at the source code of the phone book example of RadJumpList in our Telerik Demos application. You can download the source code of the app from the Downloads section of your account.

Let me know if you need further assistance with this.

Kind regards,
Deyan
the Telerik team

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

Tags
JumpList
Asked by
Bil Simser
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or