SMART datagrid v1.4 > Classes > DataColumn

Back  Forward

DataLudi.DataColumn.nanText  property

NUMBER 필드의 값이 NaN일 때 데이터셀에 표시할 문자열. 

기본값은 null.

Getter
function nanText(): String
Setter
function setNanText(value: String)
Code -1
    var fields = [{
        fieldName: 'addr',
        dataType: DataLudi.ValueType.TEXT
    }, {
        fieldName: 'distance',
        dataType: 'number'
    },
    ...
    ];
    dataSource.setFields(fields);
    
    var columns = [{
        name: "addr",
        fieldName: "addr"
    }, {
        name:"distance",
        fieldName:"distance",
        nanText:"0"
    },
    ...
    ];
Code -2
    $('#setNaN').click(function () {
        var column = grid.focusedColumn();
        column.setNanText('0');
    });
See Also
ValueType
DataField
GridStyles
Examples
Empty Value
Number Value