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

What is the best event to change GroupPickerItemsSource, GroupDescriptors and SortDescriptors

5 Answers 66 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.
Rajasekar
Top achievements
Rank 1
Rajasekar asked on 14 Jul 2012, 01:02 PM
Hi,

We are using Jumplist by data binding to an observable collection. However when the data source changes, there does not seem to be an event which gets fired where the group items, group descriptors and sort descriptors can be reinitialized. Are there any event which occurs that we have missed? Currently we are trying to use PropertyChanged( ) event and using "ItemCount" property for comparison, but this does not seem to perform optimally and if count remains the same, then it seems to be a bug. Is this a better way of doing it?

5 Answers, 1 is accepted

Sort by
0
Accepted
Deyan
Telerik team
answered on 16 Jul 2012, 06:27 AM
Hello Rajasekar,

Thanks for writing and for your question.

RadJumpList does not expose any events which are fired when data descriptors need to be changed since the control cannot know when the data descriptors need update. This is specific to the application scenario and therefore any dedicated events are not available.

As far as I understand, you want to change the data descriptors when you change the data source. You can implement this functionality in your view model which you use to bind the data source. Since the Group-/Filter and SortDescriptors properties are bindable, you can define additional collections on your view model which you will use to populate the descriptors on the RadJumpList control. You will reset these properties anytime you plan to update the data source for RadJumpList.

There are also some important notes to make regarding performance: it is good to clear the data descriptors and set the new ones after clearing the source collection and before binding to the new one.

You can read more about binding the Sort/Group/Filter Descriptors collections here:

http://www.telerik.com/help/windows-phone/radjumplist-features-group-descriptors.html

I hope this helps.

Kind regards,
Deyan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Rajasekar
Top achievements
Rank 1
answered on 16 Jul 2012, 09:59 AM
Hi Deyan,

Thank you. Will try the same and get back in case of any queries.

Thanks,
Raj
0
Rajasekar
Top achievements
Rank 1
answered on 16 Jul 2012, 12:07 PM
Hi Deyan,

Link sent didn't have too much information on binding to model, however attempt as below is not working as expected too. grouping/filtering/sorting is not happening based on the descriptors added. Is it possible to send any additional links for help? If you need more information, please let me know.

We now changed the control to bind as below, where all descriptors are bound to the model we are using...
<telerikDataControls:RadJumpList 
			ItemsSource="{Binding Path=Value.RawResults}"
			GroupPickerItemsSource="{Binding Path=Value.GroupPickerItems, Converter={StaticResource DebugConverter}}"
			GroupDescriptorsSource="{Binding Path=Value.GroupDescriptors, Converter={StaticResource DebugConverter}}"
			SortDescriptorsSource="{Binding Path=Value.SortDescriptors, Converter={StaticResource DebugConverter}}"
			IsGroupPickerEnabled="True"
			IsStickyHeaderEnabled="True"
			IsAsyncBalanceEnabled="True"
			...
Model returns the following types for the descriptors. Model does throw property changed event for the below properties.

GroupPickerItemsSource-
Actual=System.String[]
Expected=System.Collections.IEnumerable

GroupDescriptorsSource-
Actual=System.Collections.Generic.List`1[Telerik.Windows.Data.GenericGroupDescriptor`2[System.Collections.Generic.IDictionary`2[System.String,System.Object],System.String]] Expected=System.Collections.Generic.IEnumerable`1[Telerik.Windows.Data.DataDescriptor]

SortDescriptorsSource-
Actual=System.Collections.Generic.List`1[Telerik.Windows.Data.GenericSortDescriptor`2[System.Collections.Generic.IDictionary`2[System.String,System.Object],System.String]] Expected=System.Collections.Generic.IEnumerable`1[Telerik.Windows.Data.DataDescriptor]
0
Deyan
Telerik team
answered on 17 Jul 2012, 07:09 AM
Hi Rajasekar,

Thanks for getting back to me.

It will be great if you can send me your application so that I can directly take a look and thus be able to provide you with further assistance.

Note that you will have to open a new support ticket in order to be able to attach your project. Attaching files on the public forums is not supported for security reasons.

Let me know if I can be of further assistance on any matter.

Regards,
Deyan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Rajasekar
Top achievements
Rank 1
answered on 17 Jul 2012, 01:09 PM
hi Deyan,

Thank you. Will try to get a sample to you as soon as possible and use a ticket for the same.

Cheers,
Raj
Tags
JumpList
Asked by
Rajasekar
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Rajasekar
Top achievements
Rank 1
Share this question
or