Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You posted <strong>two separate questions</strong> together. It makes difficult for other users to find the information. It's better to separate the current questions in two.</p> <p>Nevertheless, about the first part of your question I want just describe that the behavior of the old Searching Dialog was so because of the usage of <a href="http://api.jquery.com/clone/" rel="nofollow noreferrer">jQuery.clone</a>. The function had many bugs which was not fixed since a long time. So the Searching Dialog worked wrong in some situations. In the new implementation of the Searching Dialog one didn't used <a href="http://api.jquery.com/clone/" rel="nofollow noreferrer">jQuery.clone</a> explicitly as the only safe way to solve the problems. The behavior which you miss in the new version of the Searching Dialog was <strong>by default</strong> implemented. In the new Searching Dialog the corresponding code isn't exist, but you can write it yourself. Mostly what you need is to write your custom code in the <a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:singe_searching#options" rel="nofollow noreferrer">afterRedraw</a> callback.</p> <p>You should take in consideration that jqGrid support now powerful <code>multipleGroup: true</code> option. So what you need is probably to copy the selections from another controls <em>of the same group</em>:</p> <p><img src="https://i.stack.imgur.com/kO7Dj.png" alt="enter image description here"></p> <p>About your second question:</p> <p><a href="https://stackoverflow.com/a/6117351/315935">The answer</a> contains <a href="http://www.ok-soft-gmbh.com/jqGrid/SimpleLocalGridWithAdvSearching2.htm" rel="nofollow noreferrer">the demo</a> which describe the idea to unbind the <code>click</code>. Probably event better would be to unbind or to hide the "Delete rule" button only if it is the only button.</p> <p>If you don't use <code>multipleGroup: true</code> option you can try the following</p> <pre class="lang-js prettyprint-override"><code>$.extend($.jgrid.search, { multipleSearch: true, overlay: 0, afterRedraw: function () { // don't permit to remove the last rule $('input.delete-rule:first',this).unbind('click').hide(); } }); </code></pre> <p>In case of usage <code>multipleGroup: true</code> the better will be probably another code</p> <pre class="lang-js prettyprint-override"><code>$.extend($.jgrid.search, { multipleSearch: true, multipleGroup: true, overlay: 0, afterRedraw: function () { // don't permit to remove the last rule var $delRules = $('input.delete-rule', this); if ($delRules.length === 1) { $delRules.unbind('click').hide(); } } }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload