Try Now
More in this section

Forums / Developing with Sitefinity / Sorting items in a list view

Sorting items in a list view

3 posts, 0 answered
  1. Nick
    Nick avatar
    113 posts
    21 Oct 2008
    27 Feb 2013
    Link to this post

    We need to implement custom ordering for list widgets for module builder content. The ordering is specific to that particular widget on that particular page (e.g. the same item may be in several different lists/pages, each time in a different position) so because of this the ordinal value cannot be added and maintained within the item content itself.

    The navigation widget that comes with Sitefinity has an option to list certain pages, and once the pages have been selected you can drag and drop them into the order you want them to be in. This is exactly the sort of feature we need for the listing views of widgets for module builder content.

    Does anyone know what would be involved in implementing this? Are there any examples or ready to use controls that will help us achieve this?


    @Sitefinity - I've raised this a support ticket already, but felt that the community may also have some advice

  2. Jen Peleva
    Jen Peleva avatar
    568 posts
    10 Nov 2016
    04 Mar 2013
    Link to this post
    Hi Nick,

    I believe you're talking about the custom selection of pages option that comes with our navigation. However, when you choose it, you can't drag and drop the items in some custom position as you mentioned. To easiest way to achieve similar functionality with RadListView would be to have a custom radTreeView template and on itemDataBound to expose (set visiblw to True) only items, that suit some condition. To map the template you should follow the first approach from this blog post.


    You simply need to create an ascx file in your project and in the LayoutTemplatepath of the dynamic widget enter the relative path to this template, and your widget will start using the template. Another option would be to use the FilterExpression property, which can be found in the designer of the widget under Advanced -> ControlDefinition -> Views -> DynamicContentMasterView. Here's a sample FilterExpression, which will return items, created after 3/2/2013:

    Visible = true AND Status = Live AND DateCreated > (3/2/2013)

    The third option ismodify the designer of the widget, according to this blog post and implement your own logic for choosing items - for example add a DynamicContentSelector, which will allow you to choose dynamic content items and set them again to the filter expression, so that only those items will be visible on the front-end.


    Jen Peleva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Nick
    Nick avatar
    113 posts
    21 Oct 2008
    04 Mar 2013 in reply to Jen Peleva
    Link to this post

    Thanks for your reply, but you very much CAN sort the pages in the navigation widget provided with Sitefinity, although it is only possible when the Horizontal or Vertical display option is used.

    I've received information through the support ticket on how this can potentially be achieved for other listing widgets. I just need to find the time to try the implementation.

3 posts, 0 answered