22972 Posts in 11596 Topics by 2824 members
General questions about getting started with SilverStripe that don't fit in any of the categories above.
|Go to End|
21 July 2009 at 11:25am Last edited: 23 July 2009 8:07am
I'm using HasManyComplexTableField to manage 'bookings'.
The default datagrid view (similar to this one: http://tinyurl.com/lsper6) defaults to 'pages' of 10 items each.
Is there any way to alter this default amount to, say, 30 items?
Any help / advice appreciated.
23 July 2009 at 2:07am
you can do it with the 'setPageSize' method. Here's an example.
$vidField = new HasManyComplexTableField(
'VideoTitle' => 'Title'
23 July 2009 at 8:08am
Ironically I found this this morning by checking properties in complexFieldTable.php and then extending my model in the exact way you suggested.
Works a charm.
23 July 2009 at 8:09am
You also seem to be able to edit the pageSize property directly eg:
$vidField->pageSize = 20;
|Go to Top|