Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

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

Sorting MemerTableField and number of entries displayed


Reply

6 Posts   569 Views

Avatar
FullWebService

25 January 2011 at 1:16am Community Member, 38 Posts

When in Security, I'd like to be able to click on the table headers to sort the columns. Is this possible?

Also, can I set how many entries are displayed per page?

Thanks in advance!

Avatar
swaiba

25 January 2011 at 1:23am (Last edited: 25 January 2011 1:23am), Forum Moderator, 1796 Posts

I'd say the same as here...

http://www.silverstripe.org/general-questions/show/15052

but with SecurityAdmin or MemberTableField or something :)

Avatar
FullWebService

25 January 2011 at 1:58am Community Member, 38 Posts

Thanks for your reply. I was looking into the setPageSize() function and it works if I put it in RootForm in /cms/code/SecurityAdmin.php. I'd rather not edit the core files.

Avatar
swaiba

25 January 2011 at 2:29am Forum Moderator, 1796 Posts

you can add a decorator to apply it and keep it all in mysite

and I like your view - I did add it as a concern when I gave the advice previously...

Avatar
FullWebService

25 January 2011 at 2:54am (Last edited: 25 January 2011 2:54am), Community Member, 38 Posts

I've extended my Member class with some extraStatics with a DataObjectDecorator. Can I place the setPageSize() in there somewhere?

Avatar
swaiba

25 January 2011 at 3:24am Forum Moderator, 1796 Posts

it's not Member to decorate, but in whatever Admin - like RootForm like you mentioned - RootForm Decorator (note I am not sure if it is possbile - I've decorated members, leftandmain, but not a form)