22984 Posts in 11765 Topics by 2827 members
|Go to End|
11 May 2012 at 10:16pm Last edited: 11 May 2012 10:17pm
I'm having some fun with the gridfield in SS3 beta2. I can't really figure out how the many_many relations work with GridField. Here's my code:
public static $many_many = array(
"RightColumnBoxes" => 'RightColumnBox'
$gridFieldConfig = GridFieldConfig_RelationEditor::create();
$GridField = new GridField("RightColumnBoxes", "Context in right column:", $this->RightColumnBoxes(), $gridFieldConfig);
There are no errors with this, but how can I attach these many many relations to my pages where the relation is defined? There are no check boxes in the gridfield, and the search field doesn't seem to return anything.
Is it because this part of gridfield isn't finished?
11 May 2012 at 10:50pm
Ok, figured this one out...
You have to create an array of strings of fieldnames to the setSearchFields method...
It would have been nice though with a possibility to just view all records and select between these (how would I od that?).
Anyway, it works now. The code should look like this:
5 June 2012 at 10:06pm
I am also having some fun with the beta 3. You said there is not checkboxes for the dataobjects related with other dataobjects which are in the tabs. Do you know some way to handle the relationships in the way you could do with the complextablefield ????
I would like to have something like this for a project I want to upgrade.
31 July 2012 at 11:38am Last edited: 31 July 2012 11:41am
I also try to figure out how to setup the GridField for a Many-to-many relation. I can´t see checkboxes. You can browse existing DataObjects within a searchfield... and then say "Link Existing". is that the way to go?!
2 August 2012 at 2:39am Last edited: 2 August 2012 7:54am
I'm having the same problem as spierala. The DataObjects list only allows me to add, edit or delete items. But how can I edit the relation?
SyntaxError: JSON.parse: unexpected character.
In assets/_combinedfiles/lib.js at line 2586
Is there any solution to this problem? What am I doing wrong?
|Go to Top|