Monitor YUI DataTable Record Identifiers

I have it DataTablein YUI and I want the record identifier to be from my data instead yui-rec1...

How to do it?

+3
source share
2 answers

This is a private property called _sId that stores the record identifier. This follows the pattern.

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

Sorry, the recordSet method does not allow you to change the identifier of a record.

+1
source

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 do you need something else?

0
source

Source: https://habr.com/ru/post/1766522/


All Articles