Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing something? #18

Open
ghost opened this issue Aug 25, 2017 · 0 comments
Open

Missing something? #18

ghost opened this issue Aug 25, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 25, 2017

Hi everyone,

Just trying to use this addon, but actually isn't working on my SilverStripe 3 project. Here the case:

mysite/code/DuplicaEvento.php

<?php

  /**
  * Classe Duplica
  */
  class DuplicaEvento extends ModelAdmin {
	// Dichiarazione Proprietà
	private static $managed_models = array(
        'EventoCorrelato' // <- This is my DataObject related to the destination Grid
	);

    /**
    * Override funzione Form
    **/
    function getEditForm($id = null, $fields = null) {
	  $form = parent::getEditForm($id, $fields);
	  $nomeGriglia = 'EventiCorrelati'; // Trying to filter a specified Grid
	  $griglia = $form->Fields()->fieldByName($nomeGriglia);

	  if ($griglia) {
		$griglia->getConfig()->addComponent(new GridFieldCopyButton());
	  }

	  return $form;
    }
  }

I tried the main example too, with no results. My doubt is related to the fact that EventiCorrelati is a grid extended and implemented in pair with another extension (to be more specific I'm using sortablegridfield). In the first place I thought that can should be the cause. But, by trying with typical situation as standard GridFields - without any addon - the button still not appear.

Any ideas?

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants