2

I am having some trouble with getting 2 jqGrids working on the same page. Each of these grid contains a Date Field with the exact same name.

I have configured the filterToolbar option using jquery datepicker. After selecting a date from the second grid, the value gets populated back to the first grid.

Here's the jsFiddle:

http://jsfiddle.net/g2oo5nhc/8/

I think this might be an ID collision problem. Is this a bug? Or is there something wrong with my set up?

If this is indeed a bug, is there any workarounds for this problem?

Chi Chan
  • 11,890
  • 9
  • 34
  • 52
  • This is happening because two of the search elements have the same value `gs_date` for both the search fields in the grid. So datepicker tried to find the first element with that id and puts the value in that search box. You need to add idPrefix dynamically in one of your grids. I am looking into how it can be done and I will post an answer when I find something. – Dipen Shah Sep 03 '15 at 13:09
  • Look at [the answer](http://stackoverflow.com/a/29049120/315935). It's important to know which version of jqGrid you use and which *real code* you use. The demo is very dirty and I don't think the you really use jqGrid in the way. Which `datatype` you use in the real code? – Oleg Sep 03 '15 at 16:45
  • Possible duplicate of [jqGrid - datepicker fail on multiple grids when same column name is used is each grid](http://stackoverflow.com/questions/29041985/jqgrid-datepicker-fail-on-multiple-grids-when-same-column-name-is-used-is-each) – Chi Chan Oct 02 '15 at 19:57
  • @Oleg, you are right. Using `jsonmap` will resolve the issue. – Chi Chan Oct 02 '15 at 19:58

0 Answers0