public function massAction ($name)
    {          
        $dataGrid = $this->getDataGrid($name);
        
        $action = $this->getRequest()->get('action');
        
        if (!$action){
            throw new \InvalidArgumentException('Parameter "action" in not valid'); 
        }
        
        $handler = $this->container->get('neutron_data_grid.handler.datagrid');
        $handler
            ->setDataGrid($dataGrid)
            ->resolveOptions($this->getRequestParameters())
            ->buildQuery()
        ;
        
        $ids = $this->getRequest()->get('ids', array());
        $selectAll = ($this->getRequest()->get('selectAll') === 'true');

        $event = new MassActionEvent($name, $action, $ids, $selectAll, $handler->getQuery());
        $this->container->get('event_dispatcher')->dispatch(DataGridEvents::onMassAction, $event);
        
        return new JsonResponse($event->getExtraData());
    }