Jump to:

23483 Posts in 18976 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » 2.4.5 - How can I add sorting MemberTableField?

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 443 Views
  • flipsidenz
    Avatar
    Community Member
    49 Posts

    2.4.5 - How can I add sorting MemberTableField? Link to this post

    I want to be able to add sorting/ordering to the MemberTableField - how can I go about this?

    I've created an additional summary field for 'Created Date', so I can sort by this column to see the newest members.

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: 2.4.5 - How can I add sorting MemberTableField? Link to this post

    Hi there,

    Are the headers in the table not clickable to resort the results, is that what you were after?

    EDIT: Just realised you're on 2.4, see my post below for a patch to add sorting.

    Cheers,
    Sean

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: 2.4.5 - How can I add sorting MemberTableField? Link to this post

    I've patched MemberTableField to support sorting in SilverStripe 2.4.
    This didn't exist initially because MemberTableField was extended from ComplexTableField, but the sorting functionality was missed.

    SilverStripe 3 has since allowed for sorting in the Security section, however this patch is useful for those still on 2.4.x.

    I've attached the patch to this ticket.

    Let me know how you get on.

    Cheers,
    Sean

    Attached Files
  • flipsidenz
    Avatar
    Community Member
    49 Posts

    Re: 2.4.5 - How can I add sorting MemberTableField? Link to this post

    Yes, perfect. Exactly what I was looking for.

    Thank you for your assistance. Look forward to trialling 3.0 soon.

    443 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.