TAdvStringGrid and templates

I would like to
ask what is the best way to solve the following problem. I need to create a
table that will display columns selected in the TAdvListBox component (these
columns will match the columns in the sql query). The number of the columns
will be big - more than 100. The selected set of columns can be saved as a
template to the database. My question - is it better to create a grid with all
the columns (those that are selectable in TadvListBox) and then display/hide
them according to the selected  template
or create an empty grid and then add/remove columns according to the selected

The second problem is that in this grid I also need to store data not visible to the user, such as ID, etc. How to solve this problem when a user can load a template with any number of columns. How can I add a column with an ID? Depending on the template, this column will have a different position. At least there will be a few such hidden columns.

I would suggest to programmatically add the selected columns to the grid only.
You can 

grid.Columns.Add.FieldName := yourfield

For the columns containing data that should not be visible to the user, add these as last columns to the grid and cal grid.HideColumn() for these columns.