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.

Customising the CMS /

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

Modeladmin: Keep table sort order after popup close


Go to End


2 Posts   1619 Views

Avatar
Matze0681

Community Member, 25 Posts

30 September 2010 at 10:14am

hi everybody,

i need to keep the sort order from a complextablefield in modeladmin after i closed the Edit/Show/... Popup from the selected Dataobject.
i have for example a real long list of dates in a complextablefield. and sort ASC. Now if i open the edit / show popup to edit or just see the object and close it again the complextablefield will be refreshed automaticly to the default sort order.

Can i somehow override that ? (Keep the sortorder, but refresh the DataObjects if something changes)

thanks in advance for any clue

matze

Avatar
swaiba

Forum Moderator, 1899 Posts

30 September 2010 at 11:01pm

Hi best I could advise to to set a default sort for that dataobject... that will help a sort order persist...

static $default_sort = 'ID DESC';