mattjiang
Newbie

Posts: 5
|
 |
« on: August 09, 2012, 02:18:22 AM » |
|
Hi all my script is simple like below: $('#moviesList').datagrid({ url:'fetchAllMovies', pagination: true, columns:[[ {field:'movieName', title:'Movie Name', width:150}, {field:'year', title:'Release Year', width:30, align:'right', sortable:true}, {field:'director', title:'Director', width:100, sortable:true, formatter:function(value, rowData, rowIndex) { if (value != null) return value.name; else return ""; } }, {field:'id', title:'Action', width:70, align:'center', formatter:function(value, row, rowIndex) { var linkEdit = '<a href="#" onclick="goEditMovie(' + value + ')">EDIT</a>'; return linkEdit; } } ]] });
Below is HTML code <table title="Movie List" class="easyui-datagrid" id="moviesList" style="width:350px;" border="1" cellspacing="1"></table>
the point is whenever I added "pagination" attribute, datagrid will send three request to server for the target URL. you can easily see it using Chrome or Firebug.
How do I prevent this problem? thanks a lot.
|