Show Posts
|
|
Pages: [1]
|
|
2
|
General Category / EasyUI for jQuery / Re: Datagrid send three http request to fetch data from server
|
on: August 10, 2012, 05:35:09 PM
|
|
Yes, This example does send only one request to the target URL, I tried before. but it did not use the same definition method as mine. It define grid using HTML tag attributes, but I use pure JavaScript. I think using JavaScript to define grid property and behavior is better in my case. So if possible, could you help investigate why it send two duplicate AJAX request to the target URL? (It seems that I can't get source, so I can't investigate it by myself) Thanks a lot.
|
|
|
|
|
3
|
General Category / EasyUI for jQuery / Re: Datagrid send three http request to fetch data from server
|
on: August 10, 2012, 10:15:50 AM
|
|
Thanks stworthy,
I removed the css class. But there are still two duplicated requests occurred. I found this is because "pagination: true" added. so datagrid() method will fire one ajax request, but if "pagination: true" added as parameter, it will cause data grid send two duplicated request.
I think this behavior is not correct. Is there any way to prevent duplicated http request occurred?
|
|
|
|
|
4
|
General Category / EasyUI for jQuery / Datagrid send three http request to fetch data from server
|
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.
|
|
|
|
|