gepponline wrote:...So the columns should already have that names?
Yes, but the only use of this TRUE parameter is if your data do not come in the same order
as you /pre-made) columns in your datagrid.
In that case TRUE the dategrid will reorder the data to fit into the correct columns in your datagrid.
gepponline wrote:..no..that's not the case... I need to populate the data and also the column names that I don't know before i open the file where i have my data.
OK, so you have an EMPTY datagrid and need to define columns and then put data into the datagrid?
In that case you first need to define all neccessary columns like this:
Code: Select all
...
## You need to supply a CR delimited list of column names
put "Nome" & CR & "Tabella" & CR & "Tipo" & CR & "Numero" & CR & "Ubicazione" into tColumns
## Now create all these columns
set the dgProp["columns"] of grp "censite" to tColumns
## Now you can add data
set the dgText of grp "censite" to gFiliera
...
Hint:
here you find the only documantation of datagrids, load the PDF and read it about 1000 times
http://lessons.runrev.com/m/datagrid
You will see why after the first reading, datagrids are the most complex stuff EVER in Livecode!
Everytime i have a project where datagrids are involded I need to read thos PDF again and again
Best
Klaus