Sorting items in a list view

Posted by Community Admin on 04-Aug-2018 13:27

Sorting items in a list view

All Replies

Posted by Community Admin on 27-Feb-2013 00:00

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?

thanks

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

Posted by Community Admin on 04-Mar-2013 00:00

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.

www.sitefinity.com/.../mapping_external_templates_for_sitefinity_4_widgets.aspx

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.

www.sitefinity.com/.../extending-sitefinity-contentselectorsdesignerviews

Regards,
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

Posted by Community Admin on 04-Mar-2013 00:00

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.

This thread is closed