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

[SOLVED] Remove limit from gridfield list


3 Posts   224 Views


31 January 2014 at 9:39pm Community Member, 94 Posts

Hey guys,

has anyone an idea how to remove the limit of gridfield list? Normally a gridfield list shows only 20 records or so.
I found also a few links on internet about GridField_DataManipulator and something from Willr:

But I can´t get it work.

$config = GridFieldConfig_RelationEditor::create();
$config->addComponent(new GridFieldPrintButton());
$config->addComponent(new GridFieldDeleteAction());

$WorkField = new GridField(
   $this->JobWorktimes()->sort('Date', 'ASC')->limit(null),


2 February 2014 at 2:35am Forum Moderator, 1091 Posts

I don't think you can actually remove the limit, the GridField depends on the GridFieldPaginator and the GridFieldPaginator doesn't seem to let you set the number of pages to 0 (zero) or otherwise remove the limit. For me, I'm not sure about removing the limit altogether - I wouldn't want to load thousands of records in a single GridField :(

But if you're sure the number won't grow that far, I guess there's nothing against setting the number of items to 100 or 400 or...

$config = GridFieldConfig_RelationEditor::create(100);


3 February 2014 at 3:00am Community Member, 94 Posts

Thanks a lot, martimiz. This is what I've been looking for.
In my case it's unlikely to get more than 30 records, but for the usability it's better to see more records, otherwise you quickly overlook some records. Thanks again!