SMART datagrid v1.4 > Classes > DLBase

[ grids ver.1.3]   Back  Forward

DataLudi.DLBase.toggle  method

속성 이름으로 Boolean 속성 값을 반대값으로 변경한다. 

이 메소드는 this를 리턴한다. 또, 아래 처럼 속성 이름에 "."로 구분되는 속성 경로를 지정할 수 있다. 

function toggle (prop: String): this;
Returns
this
Parameters
prop - String. required.
Code -1
    // 아래 코드와 동일하다.
    return this.setProperty(!this.getProperty(prop));
Code -2
    // CheckBar 보이기/감추기
    $("#toogleCheckBar").click(function () {
        grid.toggle('checkBar.visible');
        // or
        grid.checkBar().toggle('visible');
    });
    
    // CheckBar 및 Footer 보이기/감추기
    grid.toggle('checkBar.visible').toggle('footer.visible');
See Also
setProperty
setProperties
getProperty
getProperties
assign
DataLudi Class System
Examples
Hello Grid
Hello Tree