# Yahoo! UI Library

### DataTable Widget 2.7.0

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.

#### 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.

#### getId

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

#### setData

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

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

Returns: `void`

Copyright © 2009 Yahoo! Inc. All rights reserved.