我要一步一步往上爬,等待阳光静静看着它的脸
小小的天有大大的梦想,重重的壳裹着轻轻地仰望

Enable jqgrid to do/cancel selecting only selectable items

I had this requirement these days: We have a table with many rows among which some are selectable and some are not selectable, and there is also a selecting-all button which should support do/cancel selecting all selectable rows. But after glancing over the old project, I found no similar ready-made code, so I search for this by Baidu, and found solution like below (modified and beautified):

The above code seems to work well at first attempt. But you will find that you can not undo the selecting-all operation. I cannot use google for several months, therefore I use bing to search for other solutions, and thank goodness, here are the solution:

Haha! I really think the api document for jqgrid plugin is too complicated that it scares me to earnestly read it.

赞(0) 打赏(金额可任意指定)
未经允许不得转载:峰间的云 » Enable jqgrid to do/cancel selecting only selectable items
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏