It seems that jqgrid by default lays out columns horizontally, in a normal tabular fashion across the top. This is great most of the time, but I have a situation where I want to display only 1 single record, but I want the columns to go vertically down the left side of the screen. And each data value would be just to the right of the column header to the left. This table has about 30 columns, way too much to go across the top and I don’t want to use horizontal scrolling.
I want this type of orientation in my jqgrid:
Col1 Foo1
Col2 Foo2
Col3 Foo3
NOT like this:
Col1 Col2 Col3
Foo1 Foo2 Foo3
Foo4 Foo5 Foo6
And it will always be only 1 record. How can I achieve this? And how can I enable the vertical scrollbar? I want users to be able to scroll down the screen to see all the columns.
How about adding a column to the front of the grid and then using a formatter to produce the html.
You can hide the other columns when you’re done. This assumes that everything is set up on the grid correctly, like the columns (colNames and colModel) and the json from the server.
Also, I think there might be some confusion about what you’re trying to layout, given your simple example
Col1 Foo1
Col2 Foo2
Col3 Foo3
I would think you want to be able to support layout of a ‘form’ of some type that is made up of the data being retrieved from the server, not necessarily 2 columns but a disjointed layout. I could be wrong.
Example data returned from endpoint. (can be cleaned up a bit)