title: Validation before submitting the Search form generated using filterGrid in JQGrid
body: <p>I have a search form I generated using the filterGrid option in JqGrid. I want to add a JavaScript logic which is invoked before I submit the Search form. I have added a method which is invoked by the beforeSubmit property for the filterGrid. It goes into the method before submitting, but always submits the form regardless of the value returned. I would like the form to not submit if the javascript returns false.</p>
  
  <p>Have any of you guys implemented anything like this before. Or is there any othe rbetter way to implement this. Any help on this will be really appreciated.</p>
  
  <p>Code:</p>
  
  <pre><code>$("#search").filterGrid("#resultsGrid",
                          {gridModel:true,gridNames:true,enableSearch:true,
                           formtype:"vertical",buttonclass:"submitButton",
                           enableClear:true,beforeSearch:validateDate});
  
  function validateDate(dateDiff) {
      if(daysDiff &lt; 0){
          return [false,"Message"];
      }
      } // ??? (commented by Oleg)
      return [true,""];
  }
  </code></pre>