SMART datagrid v.1 > Classes > ColumnAutoFilter

[ grids ver.1.3.7]   Back  Forward

DataLudi.ColumnAutoFilter.valueScale  property

The way to get the values which have been listed as Auto Filter Items. 

If the value is 0, it will be ignored. 

The filter items are organized by removing the duplication among all data cell values of the column, and you can organize items by considering the value of broader range as the same one depending on how specified in this property. In the table below, it has described this property value by each Data Type

Defaults to 0.

Getter
function valueScale(): Integer
Setter
function setValueScale(value: Integer)
Table-1  valueScale of each data type
Data typevalueScale
TEXTIf the value is greater than 0, it will consider the strings which have the same front as much as the specified length be the same one,
and if the value is less than 0, it will consider the strings which have the same back as much as the specified length be the same one.
e.g.) 2: 'abc', 'abdef' will be calculated as 'ab'
    -2: 'abc', 'zxabc' will be calculated as 'bc'.
NUMBERIf the value is greater than 0, when the value multiplied 10 square value of the value minus 1 is the same, it will be considered as the same one,
and if the value is less than 0, when the value multiplied -10 square value is the same, it will be considered as the same one.
e.g.) 3: 123, 177 will be calculated as 100.
    1: 1.1, 1.3 will be calculated as 1.
    -1: 0.12, 0.13 will be calculated as 0.1.
DATETime/Date values belonging to Time/Date range described in DateTimeScale constant will be calculated as the same ones.
e.g.) DateTimeScale.WEEK: The dates contained in the same week will be calculated as the same value.
Code -1
    grid.setColumns([{
        name: 'colName',
        autoFilter: {
            active: true,
            valueScale: 2
        });
    },
    ...
    ]);
See Also
active
maxCount
ignoreCase
DataField.dataType
DateTimeScale
Examples
Column Auto Filtering
Column Filtering