【问题标题】:Oracle apex - Interactive Grid setSelectedRecords does not workOracle apex - 交互式网格 setSelectedRecords 不起作用
【发布时间】:2020-06-25 14:47:15
【问题描述】:

我正在尝试按照文档在 apex Interactive Grid 中设置选定的记录 API documentation 但它不起作用。

我有一个记录数组,当我尝试使用设置选定记录时

apex.region("grid").widget().interactiveGrid("setSelectedRecords", records);

grid.setSelectedRecords(records);

当我通过控制台检查时,输出如下所示,但未选择行(选择为空,因为我将传递空数组。

console output image

我使用的是 APEX 19.2,有人遇到过类似的问题吗?有什么建议吗?

【问题讨论】:

  • 你的情况下变量记录的内容是什么?可以展示一下内容吗?
  • @Giliam 我尝试了不同的方法,其中一个是首先使用let grid = apex.region("grid").widget().interactiveGrid("getViews").grid.model.getRecord([1]) 并使用apex.region("grid").widget().interactiveGrid("setSelectedRecords", [model]); 设置网格,但它没有奏效。我的记录如下:record structure
  • John Snyders 有一个详细的博客hardlikesoftware.com/weblog/2017/02/20/… 查找“小部件方法”
  • 或另一个关于这些内容的信息博客是github.com/mgoricki/orclapex-ig-cheat-sheet

标签: oracle oracle-apex


【解决方案1】:

试试这个:

apex.region("gridId").widget().interactiveGrid("getViews","grid").setSelectedRecords(records, true);

也许必须是'[]'之间的记录例子:

var record = apex.region("gridId").widget().interactiveGrid("getViews", "grid").model.getRecord("4551");

apex.region("gridId").widget().interactiveGrid("getViews", "grid").setSelectedRecords([record],true);

【讨论】:

    猜你喜欢
    • 2020-02-22
    • 1970-01-01
    • 2019-01-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-11
    • 2021-09-17
    • 1970-01-01
    相关资源
    最近更新 更多