【问题标题】:IgGrid selectRow IssueIgGrid selectRow 问题
【发布时间】:2017-05-23 15:49:55
【问题描述】:

我正在尝试在 iggrid 上实现“RowSelectors”功能,但它不会更改为下一行。

经过进一步检查,我得到了选定的行方法,并且每一行都显示相同的 id。我通过ajax返回我的数据,如果我在变量中使用静态json并将其用作数据源,它会按预期工作,所以不确定问题是什么..

 $("#selector").igGrid("selectedRow");

我只能在按住控制并单击时实现行更改..

Object {element: n.fn.init(1), index: 0, id: 3407751001}

那么下一行是

Object {element: n.fn.init(1), index: 1, id: 3407751001}

设置..

features: [
    {
        name: "Sorting",
        columnSettings: [
            {
                columnIndex: 4,
                allowSorting: true,
                firstSortDirection: "ascending",
                currentSortDirection: "descending"
            }
        ]
    },
    {
        name: 'RowSelectors',
        enableCheckBoxes: true,
        checkBoxStateChanging: function (ui, args) {
            return false;
        },
        multipleSelection: true,
        rowSelectorClicked: function (evt, ui) {
            // Handle event  
        },
    },
    {
        name: 'Selection'
    }
]

【问题讨论】:

  • [已解决] 我将主键更改为每次迭代都是唯一的,

标签: javascript ignite-ui iggrid


【解决方案1】:

这个问题已经解决了,但我正在添加答案,所以它不会一直无人回答。

igGrid 使用的 primaryKey 列必须是每条记录都有唯一标识符的列。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-05
    • 1970-01-01
    • 2014-11-01
    相关资源
    最近更新 更多