SMART datagrid v.1 > Classes > GridDataSet

Back  Forward

DataLudi.GridDataSet.getRowObject  method

Return the field values of data row which is specified by row as JSON object. 

getValues is returned as array. 

function getRowObject (row: Integer, emptyValue: *): Object;
Returns
Object
Parameters
row - Integer. required.
The number of row.
emptyValue - *.
The value which will replace undefined field value.
If specify the default data type value like String, it will be applied to all fields, and if specify JSON object, it will replace by finding the value matching field name. v 1.3.8
Code -1
    var row = grid.focusedDataRow();
    if (row) {
        var values = ds.getRowObject(row.dataIndex(), '');
        $('#addr').val(values.addr);
        #('#salary').val(values.salary);
    }
Note
See Also
getValues
getRowProps
getRowObjects
getRowsProps
getFieldValues
Examples
Grid Data Set Rows