finding out what exactly is in row data

finding out what exactly is in row data

the more I think about my problem, the more I believe my issue is a standard noobie jquery issue instead of a jqGrid plugin problem. But then again.

Eventually, this click on a row is supposed to push xml elements for a particular bullet/weapon into a accordion for further user viewing or analysis. but I need to find out what is in the grid's row as it stands now. I.E. do I need to pass a variable to my accordion and have the accordion go out and get the remaining data or has the grid already recovered my data and I just need to place the selected row data into its final resting place.

Am I on the right track with my onselectRow scripting?? When I run it, I get an error in the alert box that says "[object Object]". Where is my thinking off???

Here is what I have so far. Only the chemical and bullet/shotgun (under Small Arms) menu items work so far.

  1. $('#bullet').click(function() {
    $('#searchResults').jqGrid('GridUnload');
    $('#searchResults').jqGrid({
    url: 'weaponLib/AME_sa-bullet.xml',
    datatype: 'xml',
    colNames:["DODIC","NSN", "Size/Caliber", "Nomenclature"],
    colModel:[
    {name:"dodic",index:"dodic", xmlmap:"DODIC", width:30, align:"center", search: true, stype:"text"},
    {name:"NSN",index:"NSN", xmlmap:"transData>NSN", width:40, align:"center", search: true, stype: "float"},
    {name:"size", index:"size", xmlmap:"size",width:30, align:"center", search: true, stype: "float"},
    {name:"nomenclature",index:"nomenclature", xmlmap:"nomenclature", width:120, align:"left", search: false, sorttype: "text"}
    ],
    height:250,
    width: 900,
    viewrecords: true,
    xmlReader: {
    root : "smallArms",
    row: "bullet",
    repeatitems: false,
    id: "[saId]"
    },
    onSelectRow: function(id) {
    var gsr = $('#searchResults').jqGrid('getGridParam', 'selrow');
    if (gsr) {
    var data = $('#searchResults').jqGrid('getRowData', gsr);
    alert(data);
    };
    },
    sortname: 'dodic',
    rowNum: -1,
    altRows: true,
    pager: '#gridNavBar',
    caption: "Bullet Results"
    });
    $('#searchResults').jqGrid('navGrid', '#gridNavBar', {search: true, edit: false, del: false, add: false});
    $('#welcome').css('display', 'none');
    $('#theGrid').css('display', 'inline');
    });





































Tony
It is not the job you get handed, but what you have done with it in the end that people remember.