<script>
$(function () {
var data = [[1, 'Exxon Mobil', '339,938.0', '36,130.0'],
[2, 'Wal-Mart Stores', '315,654.0', '11,231.0']];
var dataModel = {
location: "local",
sorting: "local",
sortIndx: 'Company',
sortDir: "up"
}
var obj = {
width: 840, height: 460,
dataModel: dataModel,
wrap: false,
hwrap: false,
showBottom: false,
editable: false,
selectionModel: { type: 'cell' },
filterModel: { on: true, mode: "AND", header: true },
title: "Shipping Orders",
resizable: true,
columnBorders: true,
freezeCols: 2
};
obj.colModel = [
{ title: "Rank", width: 100, dataType: "integer" },
{ title: "Company", width: 200, dataType: "string",
filter: { type: 'textbox', condition: 'contain', listeners: ['keyup'], dataIndx: 'Company' }
},
{ title: "Revenues ($ millions)", width: 150, dataType: "float", align: "right" },
{ title: "Profits ($ millions)", width: 150, dataType: "float", align: "right" }
];
obj.dataModel = { data: data };
var $grid = $("#paged_grid").pqGrid(obj);
$grid.pqGrid("filter", { oper: 'add', data: [] })
.pqGrid("refresh");
});
</script>
I changed the sortIndx to match the dataIndx but am still getting the error (that was caused by the switch from all my live data to dummy data)
I should mention that the filter DOES work correct for the company name but I get the crash when I click any where red. (From original post)
Looks like the crash is in fn.getColIndx
Call Stack (all pqgrid.dev.js file)
fn.getColIndx (line 3109)
fc.scrollColumn (line 3562)
handlFocus (line 7399)
Is there a cdm for paramquery I can use for a jfiddle?