Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can use <code>HttpRequest</code> to get the parameters which send jqGrid. The code can be about the following:</p> <pre class="lang-cs prettyprint-override"><code>public class jqGridHandler: IHttpHandler { public void ProcessRequest(HttpContext context) { HttpRequest request = context.Request; HttpResponse response = context.Response; // get parameters sent from jqGrid string numberOfRows = request["rows"]; string pageIndex = request["page"]; string sortColumnName = request["sidx"]; string sortOrderBy = request["sord"]; string isSearch = request["_search"]; string searchField = request["searchField"]; string searchString = request["searchString"]; string searchOper = request["searchOper"]; // construct the JSON data based on the string output = BuildJQGridResults ( Convert.ToInt32 (numberOfRows), Convert.ToInt32 (pageIndex), Convert.ToInt32 (totalRecords), isSearch!= null &amp;&amp; String.Compare (isSearch, "true", StringComparison.Ordinal) == 0, searchField, searchString, searchOper ); response.ContentType = "application/json"; response.Write (output); } </code></pre> <p>It's important that the parameters <code>searchString</code>, <code>searchField</code> and <code>searchOper</code> will be set only if the user uses <a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3asinge_searching" rel="nofollow">single searching dialog</a> (you don't set <code>multipleSearch: true</code> option). For the <a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3aadvanced_searching" rel="nofollow">Advanced Searching dialog</a> the parameter <a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3aadvanced_searching#options" rel="nofollow">filters</a> will be used. If the user don't used any searching dialog the corresponding parameters (<code>searchString</code>, <code>searchField</code>, <code>searchOper</code> or <code>filters</code>) will be <code>null</code>.</p>
 

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