Sort order in custom content provider

Vote:
 

Yo folks. So I'm wondering how on earth to set the sort order for documents being returned from a custom content provider. I can't see any way to set a sort index option or sort order on content folders or media data. Any ideas?

Note that I have tried returning items from LoadChildrenReferencesAndTypes in specific orders, but that just gets overridden and the results are shown in the UI alphabetical ascending. This is what I need to somehow change.

Any advice appreciated!

#123668
Jul 14, 2015 12:25
Vote:
 

Do you mean the sort order in the gadget for the assets pane? Do you have your own gadget, or using the standard media gadget?

#123670
Jul 14, 2015 13:07
Vote:
 

Hi,

I think that to allow sorting children in your custom content provider you need to add two Capabilities on ContentProvider. Those capabilities are Edit and Move.

public class MyProvider : ContentProvider
    {
 public override ContentProviderCapabilities ProviderCapabilities
        {
            get { return ContentProviderCapabilities.Edit | ContentProviderCapabilities.Move; }
        }
}



#123671
Jul 14, 2015 13:28
Vote:
 

Per, no I mean sorting the actual assets themselves.

Grzegorz, that's an interesting idea. I may play with it, but I still have no idea how that would open up any interfaces/properties/methods I can use to control sorting...

#123672
Jul 14, 2015 13:59
Vote:
 

Yes, you are right. I thought that you were ask about how to enable sorting in Custom Provider. The code that I sent you should enable sorting in edit mode (in tree).

#123673
Jul 14, 2015 14:21