API: datatable YAHOO.widget.Record (YUI Library)

# Yahoo! UI Library

### DataTable Widget 2.8.1

Yahoo! UI Library > datatable > YAHOO.widget.Record
Search:
Filters Show Private Show Protected Show Deprecated

## Class YAHOO.widget.Record

The Record class defines a DataTable record.

### Constructor

YAHOO.widget.Record `( oConfigs )`

Parameters:
  `oConfigs <Object>` (optional) Object literal of key/value pairs.

### Properties

#### _nCount - `private Number`

Immutable unique count assigned at instantiation. Remains constant while a Record's position index can change from sorting.

#### _oData - `private Object`

Holds data for the Record in an object literal.

#### _sId - `private String`

Immutable unique ID assigned at instantiation. Remains constant while a Record's position index can change from sorting.

#### Record._nCount - `private Number`

Internal class variable to give unique IDs to Record instances.

### Methods

#### getCount

`getCount ( )`
Returns unique count assigned at instantiation.

Returns: ``
  Number

#### getData

`getData ( sField )`
Returns data for the Record for a field if given, or the entire object literal otherwise.

Parameters:
  `sField <String>` (Optional) The field from which to retrieve data value.

Returns: ``
  Object

#### getId

`getId ( )`
Returns unique ID assigned at instantiation.

Returns: ``
  String

#### setData

`void setData ( sKey , oData )`
Sets given data at the given key. Use the RecordSet method updateRecordValue to trigger events.

Parameters:
  `sKey <String>` The key of the new value.
  `oData <MIXED>` The new value.

Copyright © 2010 Yahoo! Inc. All rights reserved.