Complete datagrid with PK-id column

Hi,

I have realized that the PK-id is not show in the datagrid by default, how can I change this behaviour?

I know I can use " $crud->columns([‘id’ , ‘name’… … ", however in this case I have to put all the columns, and if I modify the table in db with a new column, I will need to update this line of the code. I would like to have something as “include all the fields of the table including “PK-id”” by default without specify the columns.

Thanks for the support.

Alberto

Hi,

Ok, I answer myself. I use the funtion GetAllDataBaseColumns from Johnny in another forum:

https://discuss.grocerycrud.com/t/a-custom-column-in-tableview/1007/5

Bests,

Alberto