控制 YUI 数据表记录 ID

发布于 2024-09-24 13:38:07 字数 101 浏览 0 评论 0原文

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

我该怎么做?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

如果没有 2024-10-01 13:38:07

它是一个名为 _sId 的私有属性,用于存储记录 ID。它遵循这种模式

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

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

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.

染年凉城似染瑾 2024-10-01 13:38:07

我认为您可以使用

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

或者您还需要其他东西?

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文