akveo / ng2-smart-table

Angular Smart Data Table component
https://akveo.github.io/ng2-smart-table/
MIT License
1.63k stars 880 forks source link

How to delete the first column ? #777

Open JVH31 opened 6 years ago

JVH31 commented 6 years ago

Hey guys,

I would like to delete the first column of the smartable template (the whole action column including the "+" and the Edit and delete buttons)

How can I do ? Thanks

AbelValdez commented 6 years ago

By adding the following properties to settings object:

editable: false,
    actions:{
      add: false,
      edit: false,
      delete: false
    }

Complete example:

settings = {
    columns: {
       ....
    },
    editable: false,
    actions: {
      add: false,
      edit: false,
      delete: false
    }
}
JVH31 commented 6 years ago

thanks :)

Le mar. 1 mai 2018 19:33, Abel Valdez notifications@github.com a écrit :

By adding the following properties to settings object:

editable: false, actions:{ add: false, edit: false, delete: false }

Complete example:

settings = { columns: { .... }, editable: false, actions: { add: false, edit: false, delete: false } }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akveo/ng2-smart-table/issues/777#issuecomment-385733651, or mute the thread https://github.com/notifications/unsubscribe-auth/Ac4qjhx1lbxhWwppv0BrKs31N8kFU1n0ks5tuJxlgaJpZM4TuB7g .

AbelValdez commented 6 years ago

No problem. :)

smoralb commented 6 years ago

Also works if you put:

settings = { actions: false, ...

This option is for hide all the options, but if you want to hide only one option you could put it like @AbelValdez says. You can put true or false in the different options for hide the option you want.