SMART datagrid v.1 > Classes > DataSet

Back  Forward

DataLudi.DataSet.getDistinctValues  method

Return the values of field specified by parameter field as array as much as specified by maxCount to avoid duplication. 

If do not specify maxCount or specify less than 0, it will look for without limitation of number. And, the array has been sorted in descending order. 

function getDistinctValues (field: Number, maxCount: Number): Array;
Returns
Array
Parameters
field - Number. required.
maxCount - Number. Defaults to -1.
Code -1
    // If no duplicated value, it will return the value from 1st to 10th row of the first field as array.
    var values = dataset.getDistinctValues(0, 10);
See Also
rowCount
hasData
findRow
Examples
Grid Data Set Rows
Hello Grid