SMART datagrid v.1 > Classes > DLBase

[ grids ver.1.3]   Back  Forward

DataLudi.DLBase.toggle  method

It changes Boolean property value as inverse value by property name. 

This method returns this. And, you can specify property path which is separated by "." in property name as below. 

function toggle (prop: String): this;
Returns
this
Parameters
prop - String. required.
Code -1
    // It is the same as below code.
    return this.setProperty(!this.getProperty(prop));
Code -2
    // Display/Hide CheckBar
    $("#toogleCheckBar").click(function () {
        grid.toggle('checkBar.visible');
        // or
        grid.checkBar().toggle('visible');
    });
    
    // Display/Hide CheckBar and Footer
    grid.toggle('checkBar.visible').toggle('footer.visible');
See Also
setProperty
setProperties
getProperty
getProperties
assign
SMART datagrid Class System
Examples
Hello Grid
Hello Tree