get unselected datagrid row jquery easyui

user765368 picture user765368 · Dec 18, 2012 · Viewed 8.1k times · Source

I'm using the jQuery EasyUI datagrid to present some data to my users. I know how to get the data of the row that is selected in the datagrid by using:

var selectedRow = $('#my_datagrid_id').datagrid('getSelected');

But does anybody know how I can get a particular row in my datagrid by its id or something (without having the row selected)?

I can't seem to find anywhere how to do this

Thanks in advance

Answer

Danang Ponorogo picture Danang Ponorogo · Dec 27, 2012
Try this one, then I think you will know what to do next :)

var myData = $('#my_datagrid_id').datagrid('getData');
alert('myData : ' + JSON.stringify(myData));