JQGrid Not select row when clicking in a particular cell

后端 未结 1 1810
粉色の甜心
粉色の甜心 2021-01-06 13:15

In my jqgrid, I have a cell that has link in it.Currently when the user clicks this link the row is selected (I am using multiselect) I don\'t want this, Is there a way to n

相关标签:
1条回答
  • 2021-01-06 13:44

    If I understand you correct you can use beforeSelectRow event handler with the following code for example:

    beforeSelectRow: function(rowid, e) {
        var $link = $('a', e.target);
        if (e.target.tagName.toUpperCase() === "A" || $link.length > 0) {
            // link exist in the item which is clicked
            return false;
        }
        return true;
    }
    

    returning of the false value from the beforeSelectRow will prevent selection of the row.

    0 讨论(0)
提交回复
热议问题