Custom Module Backend Sorting

Posted by Community Admin on 04-Aug-2018 17:55

Custom Module Backend Sorting

All Replies

Posted by Community Admin on 04-Apr-2012 00:00

When can we get Custom Module backend sorting?  Will that be in the SP or 5.1 or...?

We have a couple modules with hundreds of records, and the categories linked render as GUIDs, and we can't sort by anything so even if I add a new "field\column" to the data in order to see what it's category is, I can't sort by it.

Posted by Community Admin on 05-Apr-2012 00:00

Related to what Steve has requested, I have created some categories and used them in my Module Builder modules, but when you add them to the "Listing items" screen using backend screen tweaks, they display as Guids, even though it gives the impression that they should be rendered as text.  Also, if they had rendered as text instead of Guids, I would be hoping to Search/filter the list by letting the user type in a category in the search box and have it search on the text value of the category and not the Guid.

Thanks.

Posted by Community Admin on 23-Apr-2012 00:00

I'd like to chime in on this too. I'm looking for
1) a way to make fields sortable in the backend
2) make the name of tags display rather than a string of GUIDs on the backend (although it works just fine on the frontend)
and
3) the pager on the backend is behaving strangely -- I have 400+ items and it gets to its last page but shows a number and the elipsis like there's another page, and if you click on that it shows the create-your-first message like there's nothing in the module at all.

Posted by Community Admin on 25-Apr-2012 00:00

Hi,


Additional backend filtering most probably won't be added for the 5.1 release because currently we are changing the way custom content items are displayed in the backend to enable hierarchical content types. We wan't to make sure that the new functionality is behaving correctly and after that we will fine-tune it with features like sorting. However we have logged this as a feature request so that you can vote for it and track its progress.


For the tags and categories that are shown as GUIDs in the columns we also have a pits issue so that you can vote for it. As a matter of fact we tried to fix this bug several times but the solution for it isn't that trivial and will take lots of time and effort. Maybe you have noticed that we don't display taxonomies in the grid view anywhere else in the backend so we need additional implementation.


The problem with pagination in the grid view is fixed in the service pack so upgrading to it should resolve the issue.Kind regards,
Stoimen Stoimenov
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 26-Apr-2012 00:00

Thanks for the response. I guess that makes sense. I went ahead and voted for the PITS item.

Posted by Community Admin on 03-Jan-2013 00:00

Telerik, any updates about sorting functionality?

Steve, did you find any workarounds?

Thanks,
Denis.

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

Hi Denis,

There is a detailed blog post how to manually add sorting functionality in the backend grid view

http://www.sitefinity.com/blogs/stefanitacheva/posts/stefani-tacheva-s-blog/2012/10/11/sorting-dynamic-and-content-items-by-title-and-email-in-the-grid

This will sort by any short text field in your module.


Kind regards,
Stoimen Stoimenov
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 10-Jan-2013 00:00

Hi,

thank you for the response.
I was able to create sidebar widget for sorting functionality (by custom taxonomy).
There were few issues during implementation (Described in this post. Could you please take a look let me know if I did everything correctly?)

I have couple more questions about my custom widget:
1) My widget shows items count for each taxonomy value

clientTemplateBuilderType.Append(@"<a href=""javascript:void(0);"" class=""sf_binderCommand_filterByTag");
clientTemplateBuilderType.Append(@""">Title</a> <span class='sfCount'>(ItemsCount)</span>");
ItemCount is not automatically updated after taxonomy values are updated for some items in the grid. For example:
- one item having taxa1 and widget shows taxa1 (1)
- I assign the other item to have taxa1
- I go back to the widget it still shows taxa1 (1) instead of taxa1 (2)
If I will reload page it will shot the correct value (2). I guess the widget should be rebinded each time the greed is updated? My idea would be somehow subscribe to masterGridView.DataBound event and rebind widget each time it occurs. Do you have any examples of doing this?

2) How can I customize side-widget link text? Please see link_text attachment.
As far as I see the link is generated by the following code:
DefinitionsHelper.CreateTaxonomyLink(
    new Guid("8B121C60-692F-45B3-8E87-05D35F696E92"),
    DefinitionsHelper.HideSectionsExceptCommandName,
    DefinitionsHelper.ConstructDisplaySectionsCommandArgument(portfolioItemTypesFilterSection.WrapperTagId),
    sidebarSection);
and it uses automatically from taxonomy title as the link text.

Posted by Community Admin on 15-Jan-2013 00:00

Hi Denis,

Yes, since the state (or data) of the widget has been changed, it has to be rebound to update with the latest information.

To customize the link text in the side bar you can implement use the extension method from below code instead of making a call to DefinitionsHelper. Please put this method in a static class and call it with appropriate arguments.

public static void CreateTaxonomyLinkWithTitle(Guid id, string commandName, string commandArgument, WidgetBarSectionElement sidebar, string title = string.Empty)
       
           var taxonomyManager = TaxonomyManager.GetManager();
           var taxonomy = taxonomyManager
           .GetTaxonomies<Taxonomy>()
           .Where(t => t.Id == id)
           .SingleOrDefault();
 
           if (taxonomy != null)
           
               var taxonomyTitle = taxonomy.Title;
       string linkText = string.IsNullOrEmpty(title) ? taxonomyTitle: title;
               var name = taxonomy.Name;
 
               sidebar.Items.Add(new CommandWidgetElement(sidebar.Items)
               
                   Name = name + "Command",
                   CommandName = commandName,
                   CommandArgument = commandArgument,
                   ButtonType = CommandButtonType.SimpleLinkButton,
                   Text = "by " + linkText + "...",
                   WidgetType = typeof(CommandWidget)
               );
           
       
All the best,
Venkata Koppaka
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 15-Jan-2013 00:00

Hi Venkata,

Thank you for the code sample, I will try it.

But how I can rebind custom widget each time master grid updates? That was a question too :). Do you have any examples of this? Please let me know! Thanks.

Posted by Community Admin on 18-Jan-2013 00:00

Hello Dennis,

Can you open a support ticket and send your current solution to us? It would be easier for us to take a look and debug on your solution.

Kind regards,
Venkata Koppaka
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 21-May-2013 00:00

I'm using Sitefinity 6.0.

I'm also seeing the field type "array of guids" being displayed as guids in the grid view of the content type. This is for a related content type. I worked on the edit view but not the grid view.

This is really hurting our project, and may force us to triple our dev effort to build custom modules by hand. Are there any workarounds?? Not sure why it has not been fixed in 6.0...

Posted by Community Admin on 22-May-2013 00:00

@Adam,
  I feel your pain...I really do, I've been harping on this one since the Guid fields come out as "a thing" :)

The fundamental problem is the module type just links in a Guid\Guid[] field.  It doesn't know that that Guid field relates to anything...know what I mean?  It has no idea that Guid is storing related data for another dynamic module type or even which one.

Once they can do that, and the UI knows about relationships, it can work (and btw, if you log into your everlive.com account...built with sitefinity...and they have it working very well).

This thread is closed