JQGrid MultiSelect check boxes not unchecking when clicking on rows
i have the following JQGrid
$("#proposalsTable").jqGrid({
url: url,
datatype: 'json',
mtype: 'GET',
altRows: false,
colNames: ['Model', 'Model Year', 'Cabinet', 'Shell', 'Customer', 'Designed By', 'Date'],
colModel: [
{ name: 'Model', index: 'Model', align: 'left' },
{ name: 'ModelYear', index: 'ModelYear', align: 'left' },
{ name: 'CabinetColor', inde开发者_如何学JAVAx: 'CabinetColor', align: 'left' },
{ name: 'ShellColor', index: 'ShellColor', align: 'left' },
{ name: 'CustomerName', index: 'CustomerName', align: 'left' },
{ name: 'DesignedBy', index: 'DesignedBy', align: 'left' },
{ name: 'ProposalDate', index: 'ProposalDate', align: 'left' },
],
pager: jQuery("#proposalsPager"),
rowNum: 50,
rowList: [50, 75, 100],
sortname: 'ProposalDate',
sortorder: "desc",
viewrecords: true,
height: '700px',
multiselect: true,
autowidth: true,
shrinkToFit: true
});
When I go through and check the check boxes the check box is checked and the row color shows that it is selected... But if I go back through and just click on the row(not on the check box) The row color shows it is not selected but the check box stays checked. If I run code to see if there really are checked at this point. They are not. But it I go back through and check the check boxes the rows get de-selected and although the checkbox shows a check..But the grid thinks that the rows are not selected if I run code to look at it. Very Very Very strange. How can I either make clicking the rows do nothing, or make sure that they do in fact uncheck the check boxes. I hope that makes sense. Thanks!
My approach would be to implement a function in your options to override the onSelectRow
event. This takes a rowId and a status argument.
From there, you can manipulate the row based on the rowId.
See http://www.trirand.com/jqgridwiki/doku.php?id=wiki:events for more about the events available, and how to override them. NOTE: if you override and return false, the default event handler doesn't fire.
I found the issue and just wanted to put it up here for everyone else.
I forced it to use jquery 1.4.4
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.4.min.js" type="text/javascript"></script>
Instead of getting the latest version
This fixed the issue I was having above.
精彩评论