SMART datagrid v.1 > Classes > GridDataSet
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
- The returned object is the copy of data which is stored in data set. In other words, even if update the returned object, it will not be reflected in data set.
- Like other method, you must not update Date object which is returned from DATETIME field.
- See Also
- getValues
- getRowProps
- getRowObjects
- getRowsProps
- getFieldValues
- Examples
- Grid Data Set Rows