Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The part of your question about the validation of the custom searching seems be the same which I answerd <a href="https://stackoverflow.com/questions/4074429/validation-before-submitting-the-search-form-generated-using-filtergrid-in-jqgrid/4078683#4078683">here</a>. The answer include <a href="http://www.ok-soft-gmbh.com/jqGrid/OnEnterSearchValidate.htm" rel="nofollow noreferrer">the demo</a> where the validation of the 'Client' field is included.</p> <p>How you can see, the custom searching is moved in the grid.addons.js module in the 4.0.0 version of jqGrid, so it can be removed in some later versions of jqGrid.</p> <p>There are no special searching request to the server. There are exist just the standard request to fill the grid, where the _search parameter (corresponds to <code>search</code> parameter of jqGrid) are set to true and some other parameters like <code>filters</code> describe the filter criteria. So you can use <code>emptyrecords</code> parameter of jqGrid (see <a href="https://stackoverflow.com/questions/3935645/jqgrid-supply-no-data-message-in-the-grid/3935963#3935963">here</a>). You can follow <a href="http://www.ok-soft-gmbh.com/jqGrid/EmptyMsgInBody.htm" rel="nofollow noreferrer">the demo</a> (see <a href="https://stackoverflow.com/questions/4126593/using-jqgrids-emptyrecords-option/4127666#4127666">the answer</a>) which shows the message in the grid body.</p> <p>You problems with <code>gridResize</code> seams me very easy. i suppose, that you either not included jQuery UI JavaScript (including of CSS only is not enough) or you placed call of <code>gridResize</code> in the wrong place. You don't posted the JavaScript code and the HTML code which could shows which JavaScripts files you have loaded and in which order. So I can not answer more exactly.</p>
    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. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COHi Oleg, thx for fast reponse. The test case I made is as follow: I load grid with some rows in it, then I perform the search that will result NO data from Database, I get error message in firefox "no element found", and my grid is still stay the same. But when my research return some data, these data will replace the existing data in the grid. I guess that's why I do not get the emptyrecords message when search return no data. What should I do now?
      singulars
    2. COHi, I found solution myself, in server side, I should return the exact required data by jqgrid to show emptyrecords, before I just returned null from server. Anyway, thanks alot for your hint about using emptyrecords. About the search validation, I though there's built-in validion in JQGrid, but it's not, may be I'm just wait for the built-in function in JQGrid
      singulars
    3. CO@vuvan01: You are welcome! I don't know that there are some plans to include search validation in the jqGrid, so if you need it you will have to implement it yourself. The validation of the searching could not work as other validation. For example if you "contain" or "start with" search operation for the column and for the column contain all strings must be at least 5 characters for example you should allow to enter less then 5 characters in the searching field. So the searching validation is really other as during editing. You can try to use http://docs.jquery.com/Plugins/validation.
      singulars
 

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