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

JumpList containing numeric entries

2 Answers 57 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.
Richard
Top achievements
Rank 1
Richard asked on 03 Feb 2012, 12:21 AM
Hi,

Chasing down a bug with my implementation of JumpList and wondering if you can help. We've got a list of say 20 items, with the starting characters containing a selection of letters and numbers. The control correctly groups and sorts items as expected (I have a groups such as "6", "9", "a", "e" etc.)

When I click on the group header to reveal the jump list, the entry for numbers ("#") is greyed out and I am unable to jump to any of the number-based groups. I suspect the logic for marrying numbers against "#" is not working in my code.

My code is largely based on sample code from the documentation. I'm setting group descriptors, sortdescriptors and building the grouppickeritemssource (using string alphabet = "#abcdefghijklmnopqrstuvwxyz";).

Any thoughts on what is going wrong? Is there an event fired on clicking a header (GroupHeaderItemTap)that perhaps I can trap any number presses and have them registered as alphabet "#" ?

Richard

2 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 06 Feb 2012, 09:48 AM
Hello Richard,

Thanks for contacting us and for your questions.

In general, when adding custom group picker items you take care whether they are going to be "grayed out" or not by providing a custom GroupPickerItemTemplateSelector. Also, you should handle the GroupPickerItemTap event and bring into view the corresponding group item according to the group picker selection.

My suggestion for you is to take a look at our Demos solution, particularly at the JumpList's PhoneBook example. We have a source code available for your reference, that implements exactly the same scenario.

I hope this helps.

Let me know if you need further assistance here.

All the best,
Deyan
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Romulus
Top achievements
Rank 1
answered on 29 Aug 2013, 11:51 AM
Hello Richard,
I had the same problem as you and I solved that changing the "GenericGroupDescription" from Jumb List from Demos solution to:

// add the group and sort descriptors
GenericGroupDescriptor<stringstring> groupByFirstName = new GenericGroupDescriptor<stringstring>(contact
 =>
{
    var firstLetter = contact.Substring(0, 1).ToLower();
    if (!alphabet.Contains(firstLetter))
    {
         return "#";
    }
         return contact.Substring(0, 1).ToLower();
});
this.jumpList.GroupDescriptors.Add(groupByFirstName);


Now all the numbers entry are under "#" key.
Tags
JumpList
Asked by
Richard
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Romulus
Top achievements
Rank 1
Share this question
or