sulu / ExampleNewsBundle

Sulu news example bundle
5 stars 3 forks source link

Edit link at right of my line in datagrid #18

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi, how to add an edit link on an empty column ?

I wanna have my datagrid with a column on each line, which have only an edit link.

Is this possible ?

Thanks for help !

Best Regards !

wachterjohannes commented 7 years ago

you can specify the column for the action-icon by setting it in the options:

{
    el: ...,
    ...,
    viewOptions: {
        table: {
            actionIconColumn: 'name'
        }
    }
}

this should enable you to specify also an empty column.

ghost commented 7 years ago

Yes I've try that, but it doesn't work.

If my column is empty (doesn't match to a property of entity in controller), when I set actionIconColumn to my column, the column is not set :/ . So I don't see my edit link.

column edit

wachterjohannes commented 7 years ago

the image looks like you have an error in your result from the server. are you sure the edit property of the results is present? if the property isnt there the column will not be rendered. can you post an example of the api response?