jqGrid Set Selected Rows

后端 未结 3 556
误落风尘
误落风尘 2021-01-12 06:28

I have a jqgrid with multiselect true and I want to set some of rows.(I know the row ids.) How can I do that?

I mean opposite of

$(\"#m         


        
3条回答
  •  一个人的身影
    2021-01-12 06:31

    You have to loop through the rowArray array and call setSelection method for every rowid from the rowArray:

    var i, count, $grid = $("#myTable");
    for (i = 0, count = rowArray.length; i < count; i += 1) {
        $grid.jqGrid('setSelection', rowArray[i], false);
    }
    

提交回复
热议问题