Is there a way to display columns as rows? So that the number of rows represents the number of properties of the object we are trying to display and the number of columns is the number of records returned (in my case it is always one record).
Picture
I tried searching for an existing answer but haven't found one. I also tried using formatters but I guess they are only used to format a specified cell and not the whole table.
I suppose that you need to display enumerable properties of the object (see here) and the values of the properties. The corresponding code could be for example the following:
The demo https://jsfiddle.net/OlegKi/euau0yqj/2/ uses the code and displays the following results
The main logic of the demo is in
jsonReader.root
, which should return the array with the data. I used in the demo free jqGrid, the fork of jqGrid, which I develop since a year, but the main functionality should work with the old versions of jqGrid too.