Sort order in custom content provider


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!

Jul 14, 2015 12:25

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?

Jul 14, 2015 13:07


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; }

Jul 14, 2015 13:28

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...

Jul 14, 2015 13:59

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).

Jul 14, 2015 14:21