SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.generateColumns  method

Based on the field list of DataSet being connected to grid through dataSource property, create Columns and set them as grid Column Set

name and fieldName of each column being created will be set as fieldName of data field connected in order. 

function generateColumns (clear: Boolean);
Returns
Void
Parameters
clear - Boolean. required.
If it is true, it will remove existing columns first.
Code -1
    $('#genCols').click(function () {
        grid.generateColumns(true);
    });
See Also
dataSource
columns
GridColumn
GridColumn.name
DataColumn.fieldName
DataField.fieldName
Examples
Hello Grid