I am having a weird issue and I haven't a clue in how to fix this.
Let's say I have a grid which is build on the server side - yes, we've a class DynamicGrid
(PHP) receiving a few parameters and building all the HTML/JS needed by jQgrid to render a grid.
We're also storing the grid setup in a MongoDB as for example: columns sort (horizontal & vertical) and some other custom stuff.
When the grid loads for first time the data is displayed properly. This is how the code looks like after being generated (example on Gists since it's a big one).
Here is a JSON data passed to the grid.
I can even sort the columns and it still working (column AgreementId has been reordered):
Each time I paginate the grid I check for the stored settings looking for any change (in fact it's returning all the time what's stored so no checking on differences at all) the proper order on the colNames
and colModel
.
I can say (and can leave an example if needed) the colNames
and colModel
are coming as sorted previously. The JSON data is coming properly ordered as well.
For some reason the grid is misaligned and the values won't display properly anymore.
Check in the image above how the AgreementId
and the Quote Status
are misaligned as what I have on the 2nd image.
Here is the data returned on the pagination. The order looks fine to me so there is nothing wrong on the backend part seems to be a Javascript + DOM issue or I don't know because this is killing me.
Can any give me some ideas in how to deal with this or fix it at all? The version of jQgrid used is free-jqGrid 4.14.1.
UPDATE: I think the problem could be maybe on the column "Actions" how do I fix this column to be the first one all the time and do not allow to sort it?
I have managed to move the values for the column Actions
at the beginning of my JSON data but that doesn't fix the issue.
For some reason as soon as I move forward/backward the model is not being updated properly in the DOM or somewhere and the wrong data is show at the wrong column.
I am currently out of ideas so any help still welcome :)