EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jimprucha on December 15, 2011, 09:00:26 AM



Title: How to use the loadData method for datagrid
Post by: jimprucha on December 15, 2011, 09:00:26 AM
Hi All,

I need an example on how to use the loadData method for the datagrid that is in the file jquery.datagrid.js??

Any and all help is greatly appreciated.

I have the datagrid being created and the columns added but I now want to add the JSON data to the datagrid.

Thank You,

Jim


Title: Re: How to use the loadData method for datagrid
Post by: stworthy on December 15, 2011, 07:04:06 PM
// create datagrid first
$('#tt').datagrid({
...
});
var data = [{...},{...}];
// then call 'loadData' method
$('#tt').datagrid('loadData', data);