Title: Datagrid loading/loaded method do not work on IE and chrome. Post by: citos on October 18, 2015, 11:52:13 PM In UI view, user will choose some filter condition and execute a search action.
I use a datagrid component to show the query result. I use loadData metod to refresh table view. (because I add some status flag in ajax response excepting "total" and "rows") I tested with Firefox 41.0.2, IE11 , chrome 45.0.2454.93 m, in window 7. I found Datagrid loading/loaded method work on FF but do not work on IE and chrome. Not sure if it's an issue. Any comments on it ? Here is code snapshot: $("#"+tableId).datagrid("loading");//work on FF but no effect on IE and chrome var myDataType="text"; var ajax_url="controller.php"; sendAjaxRequest(ajaxData,ajax_url,myDataType, function(JSONobj){//this is AJAX succeed callback function, JSONobj contains these fields: result, rows, total. var code = JSONobj.result.code; var msg = JSONobj.result.msg; if(code!="000"){ $.messager.alert("Message",msg,"warning"); return; } var total = JSONobj.total; if(total == 0){ $.messager.alert("Search Result","No result found.","info"); } $("#"+tableId).datagrid('loadData',JSONobj); $("#"+tableId).datagrid("loaded");//work on FF but no effect on IE and chrome } ); Title: Re: Datagrid loading/loaded method do not work on IE and chrome. Post by: stworthy on October 19, 2015, 01:09:41 AM Please refer to http://jsfiddle.net/0Lh6acae/
Title: Re: Datagrid loading/loaded method do not work on IE and chrome. Post by: citos on October 19, 2015, 02:14:32 AM thx,stworthy. So it should be that in my case, the datagrid loading time is too short to see in chrome and IE.
Title: Re: Datagrid loading/loaded method do not work on IE and chrome. Post by: Sapphire on October 19, 2015, 05:42:56 AM Hello citos,
maybe its the problem that chrome and ie don't allow load local json files with ajax. Do you load your files from a local file system or via web server? You can start chrome with a special parameter to allow loading local json files. (--allow-file-access-from-files or --disable-web-security) http://stackoverflow.com/questions/19902538/loading-local-files-with-javascript-without-a-web-server |