5

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.

Tomasz Nurkiewicz
  • 334,321
  • 69
  • 703
  • 674
HerrimanCoder
  • 6,835
  • 24
  • 78
  • 158
  • Could you describe more exactly the native format of the input data which you have? Is it something like `[{name:"Col1", value:"Foo1"}, ...]`, `{Col1: "Foo1", Col2: "Foo2"}` or any other like above? Do you can get the data from the server as JSON or XML data from one URL or you have already an JavaScript object which you want to display in form of the table with two columns? – Oleg Feb 28 '12 at 16:20
  • What is about the type of `FooXXX` data? Are they all strings, all numbers or you have somewhere additional "type" property for the column type? – Oleg Feb 28 '12 at 16:27
  • I'm getting the data from PHP, and it's a mix of strings, numbers, dates. But it could all be cast to string, I think it doesn't matter much in javascript. – HerrimanCoder Feb 29 '12 at 01:51
  • I repeat my question: **which format has the data?** Is it something like [{name:"Col1", value:"Foo1"}, ...] or like {Col1: "Foo1", Col2: "Foo2"} or just like two columns grid: [["Col1", "Foo1"], ["Col2", "Foo2"], ...] or some other format? – Oleg Feb 29 '12 at 06:03
  • Oleg, sorry for delay. I really don't know how to answer you other than show an example from other pages I use: $grid->setColProperty("ItemPrice", array("width"=>"40", "align"=>"right")); But the current page I'm working on for the vertical view, I really have no idea how to do it. It's in PHP. Can you give me an example how to do this? – HerrimanCoder Mar 01 '12 at 14:11
  • I am not PHP developer and I don't use jqGrid PHP, but the conversion of the data to the grid with two column can be done *on the client*. So I reformulate my question: can you produce JSON output like `{"Col1": "Foo1", "Col2": "Foo2", ...., "Col30": "Foo30"}` on the server side? In the case I can show you how jqGrid can read the data and display it in two columns. – Oleg Mar 01 '12 at 17:59
  • @Oleg I'm having the same issue at the moment, trying to take a tabular grid and just re-arrange the layout to look more like a detail view. The plumbing from the server to the client would be typical jqgrid plumbing with json – Stephen Patten Apr 05 '12 at 19:16
  • @SPATEN: Look on [the demo](http://www.ok-soft-gmbh.com/jqGrid/CheckboxesWithVerticalHeaders1.htm) from [the answer](http://stackoverflow.com/a/3979490/315935). I use since a long time period the approach from the demo and not only for the columns having checkboxs. – Oleg Apr 05 '12 at 19:39
  • @SPATEN: Sorry, I am just back and reread the question one more time. What one need can be solved in another way. One can convert the data transferred from the server to the Two-column grid inside of `beforeProcessing` or inside of `jsonReader.root` defined as function. I asked to post some good example of data and I would prepare the demo which do the rest. – Oleg Apr 05 '12 at 19:44
  • @Oleg I just posted a naive example of how I'm trying to accomplish the problem. – Stephen Patten Apr 05 '12 at 21:10

3 Answers3

0

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.

function detailFormatter(cellvalue, options, rowObject) {

    var content = "<form>";
               content += "<fieldset>";
               content += "<legend>Personalia:</legend>";
               content += "Name: <input type='text' value='" + rowObject[3] + "' /><br />";
               content += "Email: <input type='text' /><br />";
               content += "Date of birth: <input type='text' />";
               content += "</fieldset>";
               content += "</form>";

    return content;
}


var col_names = ['', 'Qty', 'ATR', 'Item #', 'Brand', 'Product', 'Catalog', 'Price', 'UOM', 'Case', 'Remarks', 'Wt.', 'ProductId'];
var col_model = [
{ name: 'Details', index: 'Details', formatter: detailFormatter },
{ name: 'Quantity', index: 'Quantity', width: 22, title: false, sorttype: "number", editable: true, edittype: 'text', editoptions: { size: 10, maxlength: 15} },
{ name: 'ProductAttributes', index: 'ProductAttributes', hidden: true },
{ name: 'ItemNum', index: 'ItemNum', width: 50, align: "right" },
{ name: 'BrandName', index: 'BrandName', width: 100 },
{ name: 'ProducName', index: 'ProducName', width: 150 },
{ name: 'Catalog', index: 'Catalog', width: 100 },
{ name: 'Price', index: 'Price', width: 40, sorttype: "number", align: "right" },
{ name: 'UOM', index: 'UOM', width: 30 },
{ name: 'CasePack', index: 'CasePack', width: 30 },
{ name: 'PackageRemarks', index: 'PackageRemarks', width: 80 },
{ name: 'AveWeight', index: 'AveWeight', width: 30, title: false, align: "right" },
{ name: 'ProductId', index: 'ProductId', hidden: true, key: true }



productGrid = $('#productGrid');

productGrid.jqGrid({
    scroll: 1,
    url: '/Buyer/ProductSearch/ProductsDetailService/',
    datatype: 'json',
    ajaxGridOptions: { contentType: "application/json" },
    jsonReader: {
        root: 'rows',
        page: 'page',
        total: 'total',
        records: 'records',
        repeatitems: true,
        cell: "cell",
        id: "ProductId"
    },
    colNames: col_names,
    colModel: col_model,
    rowNum: 100, // number of records per page
    mtype: "GET",
    rownumbers: true,
    rownumWidth: 40,
    height: 600,
    autowidth: true,
    sortable: true, // enable column sorting
    multiselect: true, // enable multiselct
    gridview: true,
    pager: $('#productPager'),
    viewrecords: true,
    loadui: 'block',
    emptyrecords: 'Nothing to display',
    loadComplete: function () {
        var gd = $('#productGrid');
        //fixGridSize(gd); 
    }
});

Example data returned from endpoint. (can be cleaned up a bit)

{"total":131,"page":1,"records":13051,"rows":[{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","24.42","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","26.26","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.5","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","24.92","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","26.39","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","24.48","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","24.75","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.43","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.61","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.87","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.06","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.37","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","26.51","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.24","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.65","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.34","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.27","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","26.11","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","26.19","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","24.81","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.76","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.62","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.49","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.81","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.99","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":2047556844,"cell":["","1","X~X~X~X~X~X~X~X","6706700","","2 LT OP PEND PB 6103-34E###","BE National Catalog","135.5","EA","1","","","2047556844"]},{"id":2047557330,"cell":["","1","X~X~X~X~X~X~X~X","6935200","","PENDANT 17 1/4in. 1LT SIENNA FINISH","BE National Catalog","177.51","EA","1","","","2047557330"]},{"id":2047557264,"cell":["","1","X~X~X~X~X~X~X~X","6924100","","5LT PEND PLAT FRST WHT ALBSTR GL","BE National Catalog","111.5","EA","1","","","2047557264"]},{"id":2047557039,"cell":["","1","X~X~X~X~X~X~X~X","6765700","","MOUNTING BRKT FOR 2 MINI PENDS WHT","BE National Catalog","15.28","EA","6","","","2047557039"]},{"id":2047554940,"cell":["","1","X~X~X~X~X~X~X~X","2288300","","4\u0027 PENDANT CORD SET WHT","BE National Catalog","14.37","EA","50","","","2047554940"]},{"id":4350187308,"cell":["","1","X~X~X~X~X~X~X~X","7827530","PENNANT","DOUGH ROLL VIENNA","Sysco Products Catalog","41.3","CA","216 PK","2 OZ","27 LB","4350187308"]},{"id":4350187308,"cell":["","1","X~X~X~X~X~X~X~X","7827530","PENNANT","DOUGH ROLL VIENNA","Sysco Products Catalog","39.94","CA","216 PK","2 OZ","27 LB","4350187308"]},{"id":2047556653,"cell":["","1","X~X~X~X~X~X~X~X","6682100","","1LT OUTDR PEND BLK CST AL FRST GLS","BE National Catalog","19.53","EA","6","","","2047556653"]},{"id":4284822563,"cell":["","1","P~X~X~X~X~X~X~X","DA7671","Lawson Products","(qty 3) Open & Shut Bolt Loose","BE National Catalog","25.77","CS","1","","","4284822563"]},{"id":1746213061,"cell":["","1","P~X~X~X~X~X~X~X","595671","","X-Acto(R) By Boston(R) School Pro(TM) Electric Pencil Sharpener","BE National Catalog","42.74","EA","","","","1746213061"]},{"id":3012148986,"cell":["","1","P~X~X~X~X~X~X~X","CEB34X36","","Tape, Magic, 19mm x 33m, refill","Staples\\Corporate Express - Canada","1.11","EA","1","","","3012148986"]},{"id":2263809510,"cell":["","1","P~X~X~X~X~X~X~X","593785","","Sanford(R) Uni-Ball(R) Signo Gelstick(TM) Pens, 0.7 mm, Medium Point, Blue Barrel, Blue Ink, Pack Of 12","BE National Catalog","6.23","DZ","","","","2263809510"]},{"id":3083479466,"cell":["","1","P~X~X~X~X~X~X~X","MDS131020","","PENLIGHT,DISPOSABLE,6/PK","MEDLINE - WIST","9.98","PK","6","","","3083479466"]},{"id":3083479466,"cell":["","1","P~X~X~X~X~X~X~X","MDS131020","","PENLIGHT,DISPOSABLE,6/PK","MEDLINE - SMGT","7.69","PK","6","","","3083479466"]},{"id":3083479466,"cell":["","1","P~X~X~X~X~X~X~X","MDS131020","","PENLIGHT,DISPOSABLE,6/PK","MEDLINE - THS","3.93","PK","6","","","3083479466"]},{"id":3083479466,"cell":["","1","P~X~X~X~X~X~X~X","MDS131020","","PENLIGHT,DISPOSABLE,6/PK","MEDLINE - LSSM","8.44","PK","6","","","3083479466"]},{"id":3083479466,"cell":["","1","P~X~X~X~X~X~X~X","MDS131020","","PENLIGHT,DISPOSABLE,6/PK","MEDLINE - WALKER","7.78","PK","6","","","3083479466"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.48","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.48","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","20.33","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","17.98","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.48","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","20.82","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.48","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.48","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","17.98","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.15","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.03","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","17.98","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.15","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.81","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","20.82","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.73","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.48","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.78","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":3868776945,"cell":["","1","X~X~X~X~X~X~X~X","23371","","SLOAN 601 PENAL VALVE,6-3/4\"L","BE National Catalog","227.73","EA","","","","3868776945"]},{"id":1771696671,"cell":["","1","P~X~X~X~X~X~X~X","BICMM11","","Pen, Ball point, Retractable, Medium, 4colour","Staples\\Corporate Express - Canada","3.28","EA","1","","","1771696671"]},{"id":1771702789,"cell":["","1","P~X~X~X~X~X~X~X","PENBLN15A","","Pen, Roller, ENERGEL, .5mm, Black","Staples\\Corporate Express - Canada","2.5","EA","1","","","1771702789"]},{"id":1771703397,"cell":["","1","P~X~X~X~X~X~X~X","SAN60143","","Pen, Uniball, Onyx, .7mm, Black","Staples\\Corporate Express - Canada","0.93","EA","1","","","1771703397"]},{"id":1771703401,"cell":["","1","P~X~X~X~X~X~X~X","SAN60152","","Pen, Uniball, Micro, .5mm, Red","Staples\\Corporate Express - Canada","1.65","EA","1","","","1771703401"]},{"id":1771703921,"cell":["","1","P~X~X~X~X~X~X~X","STD51163","","Sharpener, Pencil, Noris, Plastic","Staples\\Corporate Express - Canada","3.75","EA","1","","","1771703921"]},{"id":1777244009,"cell":["","1","P~X~X~X~X~X~X~X","149039","","Prismacolor(R) Col-Erase(R) Pencils, Blue, Box Of 12","BE National Catalog","9.49","BX","","","","1777244009"]},{"id":2047557554,"cell":["","1","X~X~X~X~X~X~X~X","6984100","","1LT PEND (DM) WRM GLD SCAVO GLS","BE National Catalog","27.45","EA","4","","","2047557554"]},{"id":3868776906,"cell":["","1","X~X~X~X~X~X~X~X","23675","","SLOAN 611 PENAL VALVE,9-3/4\"L","BE National Catalog","303.58","EA","","","","3868776906"]},{"id":2847053310,"cell":["","1","X~X~X~X~X~X~X~X","39834","PENNANT","PASTRY DGH PUFF WHI","AFI Foodservice","46.67","CS","2","15 LB","31.00 LB","2847053310"]},{"id":2028575199,"cell":["","1","X~X~X~X~X~X~X~X","HP16918","","HENNY PENNY ORIFICE","BE National Catalog","23.77","EA","1","","","2028575199"]},{"id":2263805248,"cell":["","1","P~X~X~X~X~X~X~X","527056","","Pilot(R) Dr. Grip(TM) Center Of Gravity Ballpoint Pen, 0.7 mm, Medium Point, Pink Metallic Barrel, Black Ink","BE National Catalog","5.69","EA","","","","2263805248"]},{"id":2263825833,"cell":["","1","P~X~X~X~X~X~X~X","863200","","Paper Mate(R) Write Bros. Grip Ballpoint Stick Pens, 1.0 mm, Medium Point, Red Barrel, Red Ink, Pack Of 12","BE National Catalog","1.79","DZ","","","","2263825833"]},{"id":1735210354,"cell":["","1","P~X~X~X~X~X~X~X","907336","","Sanford(R) Uni-Ball(R) Vision(TM) Liquid Ink Rollerball Pens, 0.7 mm, Fine Point, Gray Barrel, Blue Ink, Pack Of 12","BE National Catalog","14.66","DZ","","","","1735210354"]},{"id":2559697016,"cell":["","1","X~X~X~X~X~X~X~X","810360","DE CECCO","PASTA PENNE RIGATE #41 OU","Ace Endico","28.24","CS","20/1 LB","","24","2559697016"]},{"id":4354802160,"cell":["","1","P~X~X~X~X~X~X~X","CARNGXDIS-235","","GOODKIND PEN-WOODY","BE National Catalog","3.55","EA","1","","","4354802160"]},{"id":2795617689,"cell":["","1","X~X~X~X~X~X~X~X","158303","","03259 PROF LINE FEBREZE RTU DEEP PENETR 945ML@8","Unisource - Canada","63.56","CS","8","","","2795617689"]},{"id":3098309987,"cell":["","1","P~X~X~X~X~X~X~X","44354","","TRAY SCHOOL PENNY-SAVER NAVY BLUE 10X14","BE National Catalog","88.5","CS","24","","","3098309987"]},{"id":3150562359,"cell":["","1","P~X~X~X~X~X~X~X","2757WPEN","","WESTIN KIDS COLORED PENCILS","BE National Catalog","98.36","CA","144","","","3150562359"]},{"id":3150562359,"cell":["","1","P~X~X~X~X~X~X~X","2757WPEN","","WESTIN KIDS COLORED PENCILS","Canadian Hotel Supply","111.61","CA","144","","","3150562359"]},{"id":3161067816,"cell":["","1","P~X~X~X~X~X~X~X","NONHCR3710C","","LINER,CLEAR,30X37,10 MIC,30 GAL,25/RL","MEDLINE - WIST","28.11","CS","500","","","3161067816"]},{"id":3161067816,"cell":["","1","P~X~X~X~X~X~X~X","NONHCR3710C","","LINER,CLEAR,30X37,10 MIC,30 GAL,25/RL","MEDLINE - EBY","22.77","CS","500","","","3161067816"]}]}
Stephen Patten
  • 6,333
  • 10
  • 50
  • 84
0

You and open edit form in grid loadcomplete and hide grid afterwards.

You can move grid out of browser screen by using

   jQuery.extend(jQuery.jgrid.edit, { 
           height: 1, 
           width: 1, 
           top:-100, 
           left: -100 
    } ); 

after grid is created, call its method in loadComplete to show form:

$("#edit_grid_top").click() 
Andrus
  • 26,339
  • 60
  • 204
  • 378
0

Looks like what I'm trying to do is impossible with jqgrid: http://www.trirand.net/forum/default.aspx?g=posts&m=8186

If someone thinks it IS possible, please let me know. :-)

I guess I'll have to build a custom layout for my 1-record detail scenario. Not too big a deal.

HerrimanCoder
  • 6,835
  • 24
  • 78
  • 158