add new column in APYDataGridBundle nor work
NickName:Developer Ask DateTime:2014-06-28T20:17:50

add new column in APYDataGridBundle nor work

I try add new column to APYDataGridBundle

here is code :

$source->manipulateRow(
            function ($row)
                {
                    /**
                     * @var $row Row
                     */
                    $row->setField('newColumn', $row->getEntity()->getMorbidity());

                    return $row;
                }
            );

but it dont show on rendered table, how to show it ?

rest of code :

 /**
         * @var Grid $grid
         */
        $grid = $this->get('grid');


        $grid->setSource($source);


        $grid->hideColumns(array('id','date_create','hidden''number'));

        $grid->hideFilters();

        $grid->setActionsColumnTitle(null);

        $grid->getColumn('value')->setTitle('price');




        $userColumns = array('debtor_name','debtor_type','value', 'sell_price', 'date_sell','date_sell2');
        $grid->setColumnsOrder($userColumns);


        $myRowAction = new RowAction('see', 'CompanyController_editCompanyPartner', false, '_self');
        $grid->addRowAction($myRowAction);



        return $grid->getGridRes

ponse('meaCoreBundle:Base:grid.html.twig');

Copyright Notice:Content Author:「Developer」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/24466727/add-new-column-in-apydatagridbundle-nor-work

More about “add new column in APYDataGridBundle nor work” related questions

add new column in APYDataGridBundle nor work

I try add new column to APYDataGridBundle here is code : $source->manipulateRow( function ($row) { /** * @var $row Row ...

Show Detail

How to show relational columns in grid using APYDataGridBundle?

I use APYDataGridBundle for generating a data table. I have Person entity with a relation (1 gym can have more people): /** * @ORM\ManyToOne(targetEntity="App\Entity\Gym", inversedBy="

Show Detail

Symfony2 - APYDataGridBundle - Translate title in Entity annotations

can someone give me a hint about how to set the translated title in the annotations used by the APYDataGridBundle. I have already taken a look at the documentation but the 3 lines of explanation do...

Show Detail

Symfony2 APYDataGridbundle ManyToMany

I’m working with Symfony2 and APYDataGridBundle. I have a many to many relationship, between Film and Genre objects: /** * Film * * @ORM\Table(name="Film") * @ORM\Entity(repositoryClass="Filmoteca\

Show Detail

APYDataGridBundle: For aliased column data not displayed

I am using the APYDataGridBundle for Symfony2. My final objective is to have one line per user in the grid (ok for now) and to have a favoris_id column with the id or null (then with JS I can mana...

Show Detail

Dynamic SQL Add New Column and Work with it

Is there any way to add column and select / update that new column in dynamic SQL? CREATE TABLE #test (Id int primary key) exec(' BEGIN TRAN ALTER TABLE #test ADD [Id_copy] int null --GO...

Show Detail

Rails migration, add new column using split - split() doesn't work

I'm trying to add a max and min column to my model, based on a delimited string from another column: 804025|1356906|2246774 So the min should be: 804025, and the max should be: 2246774 I'm using...

Show Detail

Add a tag to a new column after reading the column content

I have an Excel file, which has tens of thousands of English/Latin and Arabic words in two columns, first column's name: "EN", the another column's name: "AR". The column I want to work on is "AR" ...

Show Detail

How to add a new column with maximum value?

I have a Dataframe with 2 columns tag and value. I want to add a new column that contains the max of value column. (It will be the same value for every row). I tried to do something as follows, b...

Show Detail

SWT Setting Column Height or insert new line

I currently have a Table [org.eclipse.swt.widgets.Table] with several TableColumns; however, due to UI space restrictions I have a bit of an issue. Lets say for example I had a table column named "

Show Detail