Limit adding search options in jqgrid

2019-09-08 09:09发布

问题:

I was working on jqgrid functionality. In multi searching in jqgrid, on clicking '+' button continuously, the number of search tabs will be added infinitely. Is there any way to limit the adding of search rows ?

回答1:

One can use afterRedraw callback to calculate the number of rules and to disable '+' buttons after the limit is archived. If the number of buttons less then the limit one should enable '+' buttons. See the answer for more details.