代码之家  ›  专栏  ›  技术社区  ›  Kristopher Ives

控制YUI数据表记录ID

  •  3
  • Kristopher Ives  · 技术社区  · 14 年前

    我有一个 DataTable 在YUI中,我希望记录ID来自我的数据,而不是 yui-rec1 ...

    我该怎么做?

    2 回复  |  直到 14 年前
        1
  •  1
  •   Arthur Ronald    14 年前

    这是私人财产 调用存储记录id的\u sId。它遵循以下模式

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

    抱歉,记录集API不允许您修改记录id。

        2
  •  0
  •   dmitko    14 年前

    我想你可以用

    dataTAble.getRecord

    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

    或者你需要别的东西?