[jQuery] jqGrid and loadonce
So I've been experimenting with jqGrid and I seem to have hit a wall.
I have the following:
$(document).ready(function() {
$("#my_table").jqGrid({
url:'data.txt',
datatype: "json",
colNames: ['Col1','Col2','Col3],
colModel: [
{name: 'Col1',index: 'Col1', width: 100},
{name: 'Col2',index: 'Col2', width: 100},
{name: 'Col3',index: 'Col3', width: 100}
],
rowNum:10,
loadonce: true,
<other options here that I'm not having issues with>
});
});
Here's my problem:
According to the documentation at http://www.trirand.com/blog/?page_id=4,
if you specify loadonce to be true, all other manipulation gets done
client side.
I had thought that that meant that if I loaded everything this way (I
have fairly small data sets, so I don't need pagination, etc) that I'd
be able to sort client side but load with json. However, when I click
on one of the columns to sort, I get the following error in firebug:
$(row).children("td").eq is not a function
[Break on this error] row.sortKey = findSortKey($
(row).children('td').eq(column));
What am I doing wrong? As near as I can tell by the documentation I'm
calling everything right, and the data *does* load. It just won't
sort.