SetGridDataSource
Connects a data source to a data source grid.
Syntax
SetGridDataSource( GridKeyword, DataSourceName, ItemsPerPage, AutoGenerateColumns, ModelReference );
Parameters
Parameter Name | Type | Description | Optional? | Default Value |
---|---|---|---|---|
GridKeyword | String | The keyword of a data source grid. | No | n/a |
DataSourceName | String | The name of the data source to connect to the grid. | No | n/a |
ItemsPerPage | String | The number of rows to display per page in the grid. | No | n/a |
AutoGenerateColumns | Boolean |
Determines if the columns in the grid should be auto-generated based on the data source's structure. If this is left as False, the existing data grid configuration will be used - as such, the columns in the grid must be configured to match those of the data source. |
Yes | 0/False |
ModelReference | String | The model reference associated with the chosen data source. If the function is called by a model, it assumes the data source exists within that model, so you do not need to specify a reference unless the data source exists in a different model on the same repository. If the function is called outside the context of a model - for example, in a web page expression or via the DATASOURCE element tag - you must specify the model containing the data source. | Yes | "" |
Output
If successful, the function will return a value of True; otherwise it will return an error message.