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

6 posts, 1 answers
  1. Rajasekar
    Rajasekar avatar
    6 posts
    Member since:
    Nov 2008

    Posted 14 Jul 2012 Link to this post

    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?
  2. Answer
    Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 16 Jul 2012 Link to this post

    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.

  3. DevCraft banner
  4. Rajasekar
    Rajasekar avatar
    6 posts
    Member since:
    Nov 2008

    Posted 16 Jul 2012 Link to this post

    Hi Deyan,

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

    Thanks,
    Raj
  5. Rajasekar
    Rajasekar avatar
    6 posts
    Member since:
    Nov 2008

    Posted 16 Jul 2012 Link to this post

    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]
  6. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 17 Jul 2012 Link to this post

    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.

  7. Rajasekar
    Rajasekar avatar
    6 posts
    Member since:
    Nov 2008

    Posted 17 Jul 2012 Link to this post

    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
Back to Top
DevCraft banner