SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.existsCellStyle  method

如果在CellStyleManager中,已有注册通过styleid而指定的单元格样式,就会返回true。 

function existsCellStyle (styleId: String): Boolean;
Returns
Boolean
Parameters
styleId - String. required.
Code -1
    var sm = grid.styleManager();
    // 如果有名为'style1'的styleid的样式,就会将样式适用在第五行的第四个单元格。
    if (grid.existsCellStyle('style1')) {
        sm.setStyleAt(4, 3, 'style1');
    };
See Also
styleManager
CellStyleManager
CellStyle
Examples
单元格样式