SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.setOptions  method

Set the properties of grid setting option and component at the same time. 

You can set the properties of displayOptions, editOptions, operateOptions options specified in parameter source and components of checkBar, rowIndicator at the same time. In the object structure below, it has listed the property names. 

{
    // Options
    display: {},        // displayOptions
    edit: {},           // eidtOptions
    operate: {}         // operateOptions
    
    // Components
    body: {},           // body
    header: {},         // header
    footer: {},         // footer
    rowIndicator: {},   // rowIndicator
    checkBar: {},       // checkBar
    rowGroup: {},       // rowGroup
    groupPanel: {}      // groupPanel
}

In addition, since grid.setProperties is being called within this method, you can also specify as below. 

{
    "display.rowHeight": 30,
    "checkBar.styles": {
        "background": "#ff0000"
    },
    "footer.styles.background": "#ffff00"
}
function setOptions (source: Object);
Returns
Void
Parameters
source - Object.
Code -1
    grid.setOptions({
        display: {
            rowResizable: true
        },
        edit: {
            editable: false
        },
        operate: {
            sortingEnabled: true
        },
        "rowIndicator.width": 30,
        "header.styles.background": "#ff0000"
    });
See Also
displayOptions
editOptions
operateOptions
header
footer
body
rowIndicator
checkBar
rowGroup
DisplayOptions
EditOptions
OperateOptions
Examples
Hello Grid