tags:

views:

29

answers:

1

Hello all,

I found that if I load the data to jqGrid by addRowData with my rowid assigned, the rowid will be reset to the row index (started from 1) after I call .trigger("reloadGrid") or data is sorted by a column. It troubles me because I want to access the data of the user selected row, and because the rowid is reset, I am not able to get currect rowid thus can't get the data of the row as well.

Could anybody help on this? Thanks.

A: 

Hi, I have the same problem.

I want to access data to refresh some values of the table, but after sorting, the rowid's change. How can I have a reqlly unique identifier that does not changes?

$('#tree').addRowData('LONDON',{city: 'LONDON', temperature: 30});
$('#tree').addRowData('LONDON',{city: 'PARIS', temperature: 31});
$('#tree').addRowData('LONDON',{city: 'MADRID', temperature: 33});

---- a user clicks on a column to sort ----

$('#tree').setRowData('LONDON',{temperature: 29});
$('#tree').setRowData('LONDON',{temperature: 30});
$('#tree').setRowData('LONDON',{temperature: 32});

This does not work...

Diogo