单击单元格时获取 UltraWebGrid 选定行数据键

发布于 2024-12-12 05:22:10 字数 174 浏览 5 评论 0原文

我有一个绑定到数据源的 Infragistics UltraWebGrid;我试图允许用户更改行中几个单元格的值,因此我在后面的代码中捕获了 CellClick 事件。虽然事件的参数为我提供了单元格键(即列名称),但我仍然需要具有所选行的 DataKey 以便在数据库中进行更改。有人知道如何得到它吗? 谢谢克里斯

I have an Infragistics UltraWebGrid bound to a datasource; I am trying to allow the user to change the value of a few cells in the row, so I am trapping the CellClick event in code behind. While the event's argument gives me the cell key (which is the column name), I still need to have the selected row DataKey so as to make the change in the database. Anyone knows how to get that?
Thanks

Chris

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

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

发布评论

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

评论(1

清君侧 2024-12-19 05:22:10

您可以使用 igtbl_getCellById 实用程序函数来获取单元格。获得单元格后,您可以获取它的行,然后它是关键:

var cell = igtbl_getCellById(cellId);
var row = cell.getRow();
var key = row.DataKey

以下参考文献可能会有所帮助:

Alan

You can use the igtbl_getCellById utility function to get the cell. Once you have the cell, you can get it's row and then it's key:

var cell = igtbl_getCellById(cellId);
var row = cell.getRow();
var key = row.DataKey

The following references may be helpful:

Alan

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