Take the 2-minute tour ×

I am using jqgrid 3.6.4. The following is a snippet of my code:


The problem that I am facing in firefox and chrome and not in IE, is that the grid is not getting cleared. Hence, every time the above mentioned code is called the data is being appended to the grid (whose id is 'lookupTable').

Could someone tell me why is the grid not getting cleared of its data?

share|improve this question
Do you tried to use jqGrid 4.1.2? The version 3.6.4 is really a "retro" version. It's like a question about IE 5.5 - nobody has it more. –  Oleg Sep 27 '11 at 19:23
So, is this the problem only on version 3.6.4? Then why is it working for IE? Isn't .clearGridData() also a "retro" method? I will be upgrading soon, but for now, under certain circumstances, I can't. –  Harke Sep 27 '11 at 21:44
I mean that I just have no version 3.6.4 and don't know whether the clearGridData have changed in all the years. Moreover it looks strange in your code that you use 'id' string as the id for the new row. Are you sure that you don't use the string as the id for some another element on the page? –  Oleg Sep 28 '11 at 6:05
The 'id' is used to get the value of 'id' variable from the object. The value of this 'id' is then taken as the id for the new row. So, this does not matter. I checked the firebug output to verify this. –  Harke Sep 28 '11 at 14:06
If you has variable with the name id, you should use addRowData(id, objArray5) and not addRowData('id',objArray5). The last statement uses the string 'id' and the row id and you can easy has id duplicates which are very dangerous. Another remark: I wrote many jqGrid examples, but I never need to use clearGridData and don't use addRowData since jqGrid 3.7.2. Probably you should describe how you fill the data. I suppose that you will be able to rewrite the code to have better performance and no problems which you described here. –  Oleg Sep 28 '11 at 14:22

1 Answer 1

I remember facing the same issue. I resolved it by reloading grid after clear and then adding the new data. This issue exists even in the recent 4.1.2v also.


I hope this will solve the issue.

share|improve this answer
No effect. I am still facing the same problem. Works in IE but not in firefox and chrome. –  Harke Sep 28 '11 at 14:10

Your Answer


