Forum


18:24

22/02/2013

I have an html form and I am trying to do something with the data on the grid when a row is double clicked. Below is the declaration of the jqgrid and my attempt to do get the data when a row is double clicked. My section of code does not get hit at all. How can I get this to work?
part of the javascript
[CODE]
<script type="text/javascript" language="javascript">
$(document).ready(function(){
jQuery("#gridRecentPersonInquiry").jqGrid(
{
xmlReader: {
root: "RecentInquiries",
row: "RecentPersonNameInquiry",
page: "rows>page",
total: "rows>total",
records: "rows>records",
repeatitems: false,
id: "OrganizationORIID"
},
datatype: 'xmlstring',
datastr: recentPersonData,
colNames: ['First', 'Middle', 'Last', 'DOB', 'Sex', 'Operator', 'ORI', 'Date', 'Time'],
colModel: [
{ name: 'PersonGivenName', index: 'PersonGivenName', width: 40 },
{ name: 'PersonMiddleName', index: 'PersonMiddleName', width: 20 },
{ name: 'PersonLastName', index: 'PersonLastName', width: 40 },
{ name: 'PersonBirthDate', index: 'PersonBirthDate', width: 30 },
{ name: 'PersonSexCode', index: 'PersonSexCode', width: 20 },
{ name: 'Operator', index: 'Operator', width: 25 },
{ name: 'OrganizationORIID', index: 'OrganizationORIID', width: 30 },
{ name: 'InquiryDate', index: 'InquiryDate', width: 20 },
{ name: 'InquiryTime', index: 'InquiryTime', width: 20 }
],
forceFit:true,
gridview: true,
shrinkToFit:true,
rowNum: 6,
rowList: [6, 12, 18],
pager: '#pagerRecentPersonInquiry',
caption: 'Recent Person Inquiries ',
width: 800,
height: 140,
sortname: 'Date',
sortorder: 'asc',
hidegrid: false
});
}
});
jQuery("#gridRecentPersonInquiry").click(function () {
var id = jQuery("#gridRecentPersonInquiry").jqGrid('getGridParam', 'selrow');
if (id) {
var ret = jQuery("#gridRecentPersonInquiry").jqGrid('getRowData', id);
alert("id=" + ret.ORI + " first=" + ret.first + "...");
}
else {
alert("Please select row");
}
});
</script>
[/CODE]
Part of the HTML for the grid
[CODE]
<table id="gridRecentPersonInquiry"></table>
<div id="pagerRecentPersonInquiry"></div>
[/CODE]
08:20

Moderators
30/10/2007

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.
Most Users Ever Online: 715
Currently Online:
60 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66