Bring selected rows to the top from the Jqgrid

后端 未结 2 642
失恋的感觉
失恋的感觉 2020-12-04 00:21

I am using jqgrid in \'multiselect\' mode and without pagination. When the user selects individual records by using mouse click, is there any way that I can bring those sele

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-04 01:03

    If you have the IDs of the row(s) you can do a special sort on server side by using following command for e.g. MySQL:

    Select a,b,c
    FROM t
    ORDER BY FIND_IN_SET(yourColumnName, "5,10,44,29") DESC
    

    or

    ORDER BY FIELD(yourColumnName, "5") DESC
    

提交回复
热议问题