CS Nuglet: The trick to displaying Community Server Tree contents alphabetically

You can play as much as you want to drag and drop the contents of tree controls exactly how you want them in the Control Panel.  It doesn’t work, nor has ever worked.  Forum lists, too.  These are actually sweet controls, but sorting isn’t in their interactive UI lexicon.

To sort a File Gallery or other tree-based Community Server control use the Chameleon SortBy property on the web page.  Here’s an example:

<li class=”DBVTTreeListItem”>
    <CSFile:GroupData ID=”GroupData1″ Property=”Name” LinkTo=”GroupHome” runat=”server” />
    <CSFile:FolderList ID=”FolderList1″ runat=”server”>
        <QueryOverrides PageSize=”999″ SectionID=”-1″ SortBy=”Name” />
        <HeaderTemplate>
        <ul class=”DBVTTreeList”>
        </HeaderTemplate>

Article written by

A long time developer, I was an early adopter of Linux in the mid-90's for a few years until I entered corporate environments and worked with Microsoft technologies like ASP, then .NET. In 2008 I released Sueetie, an Online Community Platform built in .NET. In late 2012 I returned to my Linux roots and locked in on Java development. Much of my work is available on GitHub.