1

We have a jqGrid that shows the search box above the grid at all times. The report that shows is controlled by a dropdown. If the user changes reports, we reset the grid programmatically.If the user navigates to a grid record and then returns to the grid page, or if the user refreshes the grid page, we restore the search criteria from the session. This also works. But, if we refresh or come back, the grid is adding a new search row. See the screenshot. The actual search criteria was that Last Name contained 'Jet'. But, the grid added a blank row to search on 'id'. If I refresh again, it does not continue to add more rows - only the one empty one. I need to prevent it from adding the new row.
enter image description here

Amy Anuszewski
  • 1,843
  • 17
  • 30

1 Answers1

1

I suppose, that you have the same problem as described here. So you should make the same: to test whether postData.filters parameter are set and then in the case use searchFilter().del() to delete the last row from the saerch dialog. For details see the demo from the answer.

If it will not work you should post the demo example which can be used to reproduce your problem.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • @Amy: You are welcome! You used no voting of the answer. Was the answer not helpful? I ask this not because of additional reputation points. The problem is that the search engine use **only voting** and not "accepted" as the sorting criterium. The general rule described [here](http://stackoverflow.com/faq#howtoask) is: "As you see new answers to your question, vote up the helpful ones by clicking the upward pointing arrow to the left of the answer." So "accepted" answers with 0 votes will be almost the same as the **closed questions** and **not really solved questions**. – Oleg Apr 18 '11 at 19:45
  • I didn't know that. :) Voted it up too. – Amy Anuszewski Apr 18 '11 at 20:08
  • @Amy: I know this also not so long time. The main problem is that there are questions on the stackoverflow where no real problem exist. You can ask about the book recommendation and so on. In the case the voting is important only and it is absolutely not important which answer is accepted. "Accepted-only" questions will be not calculated in the "total score" (the number left of the tag in any user profile). I just analysed why some my answers I can not find myself during searching and have to include it in my favorites. So it is better if you vote the answer as "accept" it without the voting. – Oleg Apr 18 '11 at 20:53