Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
3.6.5 - No Rows Displaying After Update from 3.6.4
05/05/2010
22:19
Avatar
Inara
Member
Members
Forum Posts: 26
Member Since:
27/07/2009
sp_UserOfflineSmall Offline

I just attempted to upgrade my dev environment from jqGrid 3.6.4 to 3.6.5, and found that the new version results in no rows being displayed on any of my grids. There are no errors being returned by jqGrid; the grid and its associated pager are simply blank. I'm returning the data to the grid in a JSON format, if that makes any difference.

Has the format the grid is expecting back for JSON records changed?

For now, I have simply reverted back to 3.6.4, and everything appears to be working as well as always.

Thanks,

Matt

06/05/2010
10:33
Avatar
buteo
Member
Members
Forum Posts: 3
Member Since:
06/05/2010
sp_UserOfflineSmall Offline

I know it's no help to you, but I've got the same issue upgrading from 3.6.2 to 3.6.5. Also using JSON. No data displayed.

There's clearly a serious breaking change somewhere!

This is my code that works beautifully in 3.6.2 (it's requesting the data correctly and getting exactly the same JSON data that works with 3.6.2):

         jQuery(document).ready(function() {
            var mygrid = $('#list').jqGrid({
                ajaxGridOptions: { contentType: "application/json; charset=utf-8″ },
                serializeGridData: function(postdata) {
                    postdata.contract_number = $.query.get("contract_number");
                    postdata.product_serial_number = $.query.get("product_serial_number");
                    postdata.conman_customer_id = $.query.get("conman_customer_id");
                    postdata.oracle_customer_number = $.query.get("oracle_customer_number");
                    postdata.coverage_template = $.query.get("coverage_template");
                    postdata.contract_origin = $.query.get("contract_origin");
                    postdata.status = $.query.get("status");
                    postdata.not_status = $.query.get("not_status");
                    postdata.tsslog_customer_id = $.query.get("tsslog_customer_id");
                    if (postdata._search == false) {
                        postdata.searchField = $.query.get("searchfield");
                        postdata.searchString = $.query.get("searchstring");
                        postdata.searchOper = $.query.get("searchoper");
                    }
                    if (postdata.filters == null) { postdata.filters = "";}
                    return JSON.stringify(postdata);
                },
                url: "webservices/contracts.asmx/contractlist",
                datatype: "json",
                mtype: "POST", // don't know why this is needed here and not on ajaxGridOptions like contentType
                onSelectRow: function(ids) {
                    getdetaildata(ids); //version that gets the data from the web service, including data from joined tables (comments and entitlements)
                    //showDetailsFromjqGridRow(ids); //version that extracts the data from the grid row, avoiding the need for another data pull
                },
                colNames: [
                'id',
                'Contract',
                'Line',
                'Eff',
                'Ver',
                'Status',
                'Start',
                'End',
                'Cov Template',
                'Serv Part No',
                'Product',
                'Prod Part No',
                'Serial No',
                'Description',
                'Term reason',
                'Term date',
                'Contract_origin',
                'Renewal date',
                'import_status',
                'conman_cust_id',
                'Created',
                'Updated',
                'Contact_name',
                'Contact_email',
                'Contact_role',
                'Level',
                'Cust contacts',
                '3rd pty contacts',
                'bill_to_num',
                'bill_to_name',
                'bill_to_addr',
                'ship_to_num',
                'ship_to_name',
                'ship_to_addr',
                'other_num',
                'other_name',
                'other_addr'
                ],
                colModel: [
                  { name: 'id', index: 'id', width: 15, hidden: true },
                  { name: 'contract_number', index: 'contract_number', width: 80, hidden: false },
                  { name: 'line_number', index: 'line_number', hidden: true, width: 30, align: "center" },
                  { name: 'effectivity_number', index: 'effectivity_number', hidden: true, width: 30, align: "center" },
                  { name: 'version_number', index: 'version_number', hidden: true, width: 30, align: "center" },
                  { name: 'status', index: 'status', width: 70, hidden: false },
                  { name: 'start_date', index: 'start_date', width: 55, hidden: false },
                  { name: 'end_date', index: 'end_date', width: 55, hidden: false },
                  { name: 'coverage_template', index: 'coverage_template', width: 100, hidden: false },
                  { name: 'service_part_number', index: 'service_part_number', width: 80, hidden: true },
                  { name: 'product_description', index: 'product_description', width: 100, hidden: false },
                  { name: 'product_part_number', index: 'product_part_number', width: 80, hidden: false },
                  { name: 'product_serial_number', index: 'product_serial_number', width: 100, hidden: false },
                  { name: 'contract_description', index: 'contract_description', width: 100, hidden: true },
                  { name: 'termination_reason', index: 'termination_reason', width: 100, hidden: true },
                  { name: 'terminated_date', index: 'termination_date', width: 65, hidden: true },
                  { name: 'contract_origin', index: 'contract_origin', width: 80, hidden: true },
                  { name: 'renewal_date', index: 'renewal_date', width: 55, hidden: true },
                  { name: 'import_status', index: 'import_status', width: 65, hidden: true },
                  { name: 'conman_customer_id', index: 'conman_customer_id', width: 65, hidden: true },
                  { name: 'created_date', index: 'created_date', width: 55, hidden: true },
                  { name: 'updated_date', index: 'updated_date', width: 55, hidden: true },
                  { name: 'contact_name', index: 'contact_name', width: 65, hidden: true },
                  { name: 'contact_email', index: 'contact_email', width: 65, hidden: true },
                  { name: 'contact_role', index: 'contact_role', width: 65, hidden: true },
                  { name: 'level', index: 'level', width: 65, hidden: true },
                  { name: 'customer_contacts', index: 'customer_contacts', width: 65, hidden: true },
                  { name: 'third_party_contacts', index: 'third_party_contacts', width: 65, hidden: true },
                  { name: 'bill_to_customer_number', index: 'bill_to_customer_number', width: 60, hidden: true },
                  { name: 'bill_to_customer_name', index: 'bill_to_customer_name', width: 100, hidden: true },
                  { name: 'bill_to_customer_address', index: 'bill_to_customer_address', width: 100, hidden: true },
                  { name: 'ship_to_customer_number', index: 'ship_to_customer_number', width: 60, hidden: true },
                  { name: 'ship_to_customer_name', index: 'ship_to_customer_name', width: 100, hidden: true },
                  { name: 'ship_to_customer_address', index: 'ship_to_customer_address', width: 100, hidden: true },
                  { name: 'thirdparty_customer_number', index: 'thirdparty_customer_number', width: 60, hidden: true },
                  { name: 'thirdparty_customer_name', index: 'thirdparty_customer_name', width: 100, hidden: true },
                  { name: 'thirdparty_customer_address', index: 'thirdparty_customer_address', width: 100, hidden: true }
                  ],
                pager: "#pager",
                rowList: [10, 20, 30, 50, 100],
                sortable: true,  // can drag and drop columns
                gridview: true,  // faster to load, less functionality
                caption: 'Contracts',
                loadError: function (xhr, st, err) {
                    jQuery("#rsperror").html(st + " " + xhr.status + " " + xhr.statusText);
                },
                loadComplete: function (xhr) {
                    jQuery("#rsperror").html("");
                },
                editurl: "contracts.asmx/edit1″,
                width: 775,
                height: 475
            });
            jQuery("#list").jqGrid('navGrid', '#pager', { edit: false, add: false, del: false, refresh: false, search: false },
                {}, // edit options
                {}, // add options
                {}, // del options,
                {}, // refresh options
                {}  // search options  – not active – using multiple search defined below
                );
            jQuery("#list").jqGrid('gridResize', {});
            jQuery("#list").jqGrid('navButtonAdd', '#pager', {
                buttonicon: "ui-icon-calculator",
                caption: "", title: "Select columns",
                onClickButton: function() { jQuery("#list").jqGrid('columnChooser'); }
            });
            jQuery("#list").jqGrid('navButtonAdd', '#pager', {
                buttonicon: "ui-icon-search",
                caption: "", title: "Search",
                onClickButton: function() { jQuery("#list").jqGrid('searchGrid', { multipleSearch: true }); }
            });
        });

function getdetaildata(myid) {
    var mynewid = $("#list").getCell(myid,'id');
    
    $.ajax({
      type: "POST",
      url: "webservices/contracts.asmx/contractrecord",
      data: "{id: " + mynewid + "}",
      contentType: "application/json; charset=utf-8″,
      dataType: "json",
      success: function(msg) {
          showdata(msg);
           }
    });
}     

06/05/2010
13:02
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

@Inara - I'm not sure what is going with this, but if you send me a link to the problem I maybe can help.

Also which version of jQuery is used?

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

06/05/2010
20:41
Avatar
Inara
Member
Members
Forum Posts: 26
Member Since:
27/07/2009
sp_UserOfflineSmall Offline

@Tony: I'm using jQuery v1.4.2 & jQueryUI v1.8.1. (Though I tested it using UI v1.8, as well.) Here is a code example:

jQuery("#ElementDynamic").jqGrid({
    postData: {gridID:"195",recordID:"1",parentID:"",user:"",gridFilter:"",applicationName:"Alchemy"},
    colNames:['ID', '', 'Name', 'Type', 'Width', 'Style', 'Label', 'DB Column', 'Data Type', 'Align', 'Vert', 'Col'],
    colModel:[
        {name:"ID", width:50, align:"left", sortable:"true", sorttype:"int",editable:false, editrules:{required:false}, edittype:"text", editoptions:{datatype:"int"}, hidden:true},
        {name:"ElementDynamicSelect",index:"ElementDynamicSelect",width:55,sortable:false},
        {name:"Name", width:200, align:"left", sortable:"true", sorttype:"text",editable:true, editrules:{required:true}, edittype:"text", editoptions:{style:"width:96%; max-width:200px",datatype:"str"}, hidden:false},
        {name:"ElementType", width:80, align:"left", sortable:"true", sorttype:"text",editable:true, editrules:{required:true}, edittype:"select", editoptions:{style:"width:98%; max-width:80px",datatype:"str",value:{"":"","Field":"Field","Label":"Label","Table":"Table","Container":"Container","Spacer":"Spacer","Pagebreak":"Pagebreak"}}, hidden:false},
        {name:"Width", width:60, align:"left", sortable:"true", sorttype:"number",editable:true, editrules:{required:false}, edittype:"text", editoptions:{style:"width:96%; max-width:60px",datatype:"float"}, hidden:false},
        {name:"ElementStyle", width:100, align:"left", sortable:"true", sorttype:"text",editable:true, editrules:{required:false}, edittype:"text", editoptions:{style:"width:96%; max-width:100px",datatype:"str"}, hidden:false},
        {name:"Label", width:120, align:"left", sortable:"true", sorttype:"text",editable:true, editrules:{required:false}, edittype:"text", editoptions:{style:"width:96%; max-width:120px",datatype:"str"}, hidden:false},
        {name:"DBColumn", width:120, align:"left", sortable:"true", sorttype:"text",editable:true, editrules:{required:false}, edittype:"text", editoptions:{style:"width:96%; max-width:120px",datatype:"str"}, hidden:false},
        {name:"DataType", width:80, align:"left", sortable:"true", sorttype:"text",editable:true, editrules:{required:false}, edittype:"select", editoptions:{style:"width:98%; max-width:80px",datatype:"str",value:{"":"","Str":"Str","Int":"Int","Float":"Float","Percent":"Percent","Money":"Money","Bool":"Bool","Date":"Date","Time":"Time","Phone":"Phone","Datetime":"Datetime","SSN":"SSN"}}, hidden:false},
        {name:"ElementAlignment", width:60, align:"left", sortable:"true", sorttype:"text",editable:true, editrules:{required:false}, edittype:"select", editoptions:{style:"width:98%; max-width:60px",datatype:"str",value:{"":"","left":"left","center":"center","right":"right"}}, hidden:false},
        {name:"VerticalOrder", width:40, align:"left", sortable:"true", sorttype:"int",editable:true, editrules:{required:true}, edittype:"text", editoptions:{style:"width:96%; max-width:50px",datatype:"int"}, hidden:false},
        {name:"ColNum", width:40, align:"left", sortable:"true", sorttype:"text",editable:true, editrules:{required:false}, edittype:"select", editoptions:{style:"width:98%; max-width:50px",value:{"":"","3":"1"}}, hidden:false},
        ],
    height: 242,
    jsonReader: {
        root: "rows",
        page: "page",
        total: "total",
        records: "records",
        repeatitems: false,
        id: "ID"
    },
    loadComplete: function(){
            var ids = jQuery("#ElementDynamic").getDataIDs();
            for(var i=0;i<ids.length;i++){
                var cl = ids[i];
                cl = cl.replace(/,/gi,"");
                var ElementDynamicSelectCol = '<input style="height:21px;width:50px;" type="button" value="Select" onclick="submitCommand(\'edit|26|'+cl+'\');" />';
                jQuery("#ElementDynamic").setRowData(ids[i],{ElementDynamicSelect:ElementDynamicSelectCol})
                }
           },
    ondblClickRow: function(id){
        jQuery("#ElementDynamic").editRow(id,true,function(rowid){generateDatepickers("#" + rowid);},false,"alchemy_dev_table_edit_run.py",{gridID:"195",recordID:"1",applicationName:"Alchemy"});
        },
    pager: jQuery("#ElementDynamic_pager"),
    pgtext:"",
    pginput:false,
    pgbuttons:false,
    viewrecords:true,
    editurl:"alchemy_dev_table_edit_run.py",
    caption: "Dynamic Elements"
}).navGrid("#ElementDynamic_pager",
    {add:true,edit:false,del:true,search:false,refresh:false, view:false},
    {width:266.7,savekey:[true,13],closeOnEscape:true,closeOnEscape:true,closeAfterEdit:true,editData:{gridID:"195",recordID:"1",applicationName:"Alchemy"},reloadAfterSubmit:true,beforeShowForm:function(formid){generateDatepickers("#FrmGrid_ElementDynamic");}},
    {width:266.7,savekey:[true,13],closeOnEscape:true,closeAfterAdd:true,editData:{gridID:"195",recordID:"1",applicationName:"Alchemy"},reloadAfterSubmit:true,beforeShowForm:function(formid){generateDatepickers("#FrmGrid_ElementDynamic");}},
    {height:110,width:275,closeOnEscape:true,msg:"Are you sure you want to delete the selected row?",delData:{gridID:"195",recordID:"1",applicationName:"Alchemy"},reloadAfterSubmit:true},
    {}
    );

09/05/2010
20:08
Avatar
peterloron
Member
Members
Forum Posts: 4
Member Since:
09/05/2010
sp_UserOfflineSmall Offline

I am having similar behavior, although this is with a new jqGrid install and not with an upgrade. However, I've been over the code and JSON extensively and can't find any deviation from the examples. jqGrid 3.6.5, jQuery 1.4.2, jQueryUI 1.8.1.

I would be happy to try jqGrid 3.6.4, but I can't download it any longer...

10/05/2010
20:49
Avatar
peterloron
Member
Members
Forum Posts: 4
Member Since:
09/05/2010
sp_UserOfflineSmall Offline

I have this issue with the 3.6 demo files. If I use the included (3.6.1?) version of jqGrid, the demos work. If I swap in the 3.6.5 file from the website, I get no data back. This is independent of using the built in jQuery or using the latest jQuery and jQueryUI from Google's CDN.

12/05/2010
13:07
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

@Inara you have a error in the grid configuration.

The last object in colModel contain comma,

{name:"ColNum", width:40, align:"left", sortable:"true", sorttype:"text",editable:true, editrules:{required:false}, edittype:"select", editoptions:{style:"width:98%; max-width:50px",value:{"":"","3":"1"}}, hidden:false}, <===== Error
        ],

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

12/05/2010
19:58
Avatar
Inara
Member
Members
Forum Posts: 26
Member Since:
27/07/2009
sp_UserOfflineSmall Offline

Tony,

Thanks for catching that trailing comma (it was being auto-generated by one of our code tools), but it doesn't appear to be what was causing the issue. I removed the comma in question, and the grids are still loading blank, with no associated error messages. The older versions of jqGrid (3.6.4 or less) seem to work with or without the comma in place, and the new versions fails with or without it in place.

Regards,

Matt

12/05/2010
20:54
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Can you write by hand a simple grid - not generated from some code and test with the new version.

I feel that some not accepted chars are send to the grid configuration which causes this problem.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

12/05/2010
21:26
Avatar
Inara
Member
Members
Forum Posts: 26
Member Since:
27/07/2009
sp_UserOfflineSmall Offline

Tony,

I created a very simple, single-column grid, as follows:

<script type="text/javascript">
    $(function(){
        jQuery("#TestGrid").jqGrid({
            colNames:['Test'],
            colModel:[
                {name:"TestCol", width:200, align:"left"}
                ],
            height: "auto",
            url:"/cgi-bin/testgrid.py",
            datatype: "json",
            mtype: "POST",
            jsonReader: {
                root: "rows",
                page: "page",
                total: "total",
                records: "records",
                repeatitems: false,
                id: "TestCol"
            }
        });
    });
</script>

It is receiving the following JSON data from the test script:

{
    page:"1",
    total:"1",
    records:"11",
    rows:[
        {TestCol:"Test1"},
        {TestCol:"Test2"},
        {TestCol:"Test3"}
    ]
}

With 3.6.4, it works perfectly, producing three rows. With 3.6.5, it doesn't produce any rows, but also throws no errors.

If it helps, I can send you the full html page and python script I used for the test, but they are literally bare bones.

Thanks for working with me to try to sort out the issue.

12/05/2010
22:13
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Better provide a link to the problem. If possible do not include the min version, but the development one.

Thank you

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

12/05/2010
23:20
Avatar
Inara
Member
Members
Forum Posts: 26
Member Since:
27/07/2009
sp_UserOfflineSmall Offline

Tony,

Unfortunately, I do not have a public webserver available to host a demo file on at this point in time. Is there any chance you could provide the source for v3.6.4 so I could run some tests comparing the two? I have the min version of 3.6.4, but not the source.

Thanks,

Matt

13/05/2010
00:17
Avatar
Inara
Member
Members
Forum Posts: 26
Member Since:
27/07/2009
sp_UserOfflineSmall Offline

After a long debug/trace session with firebug, I finally found the source of the issue. It appears that the jqGrid 3.6.5 only supports strictly formatted JSON, with quotes around the name and value of each key. I tested flipping back and forth between 3.6.4 and 3.6.5 and dropping/adding the quotes in each to confirm that this was the problem. To use my example from above, the return data must be formatted as follows for jqGrid 3.6.5:

{
    "page":"1",
    "total":"1",
    "records":"3",
    "rows":[
        {"TestCol":"Test1"},
        {"TestCol":"Test2"},
        {"TestCol":"Test3"}
    ]
}

I hope this information will quickly resolve the issue for anyone else that was still experiencing it.

@Tony: Was this change intentional? If so, you'll probably want to update the documentation on the wiki to indicate that you've started to follow the strict JSON formatting rules, since the current examples under the JSON instructions in the "Data Manipulation" section use the old style (name:"value") and will no longer run. In any case, thanks for all the work you put into jqGrid, and for being available on the forum to discuss these issues with users.

Regards,

Matt

13/05/2010
14:16
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

First of all thank you for this investigation.

The Long Story (for 3.6.5):

In order to support JSONP correct we switch from complete ajax event to success one.

This causes to overcome jqGrid parse function.

In the success event jQuery makes his own validation for the json object and if the json format returned from the server is not correct  nothing happen.

That is:  if you want to test this just use the jQuery ajax get function  on the same request and see the result.

We need to update documentation for this purpose.

Again Thank you very much

Kind Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
64 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information