Hi,
I'm having real trouble upgrading my code from the free version, to the pro version. I'm stuck on trying to get the currently selected row in a grid. This is my code that used to work with the free version of PQGrid:
var d = $grid.pqGrid("selection", {type:'row', method:'getSelection'})[0].rowData;
This no longer works, and seems that the selection array is empty, even though a row is selected. Here is how I initialised the grid:
$grid = $("#grid").pqGrid({
colModel: [
{ title: "Client Name", width: 383, dataType: "string", dataIndx: "client_name" }
],
dataModel: {
location: "remote",
dataType: "json",
method: "POST",
postData: getPostData(),
url: "/api/accounts/get_clients.php",
getData: function(d) {
return { data: d.data };
}
},
scrollModel: { autoFit: true },
height: 424,
showTop: false,
showBottom: false,
resizable: false,
editable: false,
numberCell: { show: false },
selectionModel: { type: 'row', mode: 'single' },
hoverMode: 'row'
});
How do I get the currently selected row? (only full, single rows are what are allowed).
Thank you!