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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Sorting MemerTableField and number of entries displayed


Go to End


6 Posts   879 Views

Avatar
FullWebService

Community Member, 38 Posts

25 January 2011 at 1:16am

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

Forum Moderator, 1899 Posts

25 January 2011 at 1:23am

Edited: 25/01/2011 1:23am

I'd say the same as here...

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

but with SecurityAdmin or MemberTableField or something :)

Avatar
FullWebService

Community Member, 38 Posts

25 January 2011 at 1:58am

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

Forum Moderator, 1899 Posts

25 January 2011 at 2:29am

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

Community Member, 38 Posts

25 January 2011 at 2:54am

Edited: 25/01/2011 2:54am

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

Avatar
swaiba

Forum Moderator, 1899 Posts

25 January 2011 at 3:24am

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)