Kristopher Ives
Kristopher Ives

Reputation: 6045

Control YUI DataTable Record IDs

I have a DataTable in YUI and I want to have the record ID be from my data instead of yui-rec1 ...

How do I do that?

Upvotes: 3

Views: 708

Answers (2)

Arthur Ronald
Arthur Ronald

Reputation: 33783

It is a private property called _sId which store record id. It follows this pattern

this._sId = "yui-rec" + this._nCount;

Sorry but recordSet API does not allow you to modify record id.

Upvotes: 1

dmitko
dmitko

Reputation: 2657

I think you can use

dataTAble.getRecord method

YAHOO.widget.Record getRecord ( row )

For the given identifier, returns the associated Record instance.
Parameters:
row <HTMLElement | Number | String> DOM reference to a TR element (or child of a TR element), RecordSet position index, or Record ID.
Returns: YAHOO.widget.Record
Record instance.

http://developer.yahoo.com/yui/docs/YAHOO.widget.DataTable.html

Or you need something else?

Upvotes: 0

Related Questions