EasyUI Forum
September 14, 2025, 12:56:29 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / Bug Report / Re: edatagrid getChecked() does not work after saveRow in easyui1.5 on: August 16, 2016, 02:30:40 AM
it works now. thanks a lot for your quick response.
To avoid additional code changes, now I added the patch into jquery.easyui.min.js.
I think the easyui will include the patch in its later release. let's look forward for it.
2  General Category / Bug Report / edatagrid getChecked() does not work after saveRow in easyui1.5 on: August 13, 2016, 04:37:50 AM
Hello,
First let me list how I use edatagrid :
1)initialize
<table id="cn_datagrid_table" title="When Repeats">
   <thead>
      <tr>
         <th data-options="field:'ck',checkbox:true"></th>
         <th data-options="field:'day'" width="30%">Day of Week</th>      
            <th data-options="field:'repeat_start_time',editor:{type:'timespinner',options:{required:true}}" width="30%">Start Time</th>
            <th data-options="field:'duration',editor:{type:'numberbox',options:{precision:0,required:true,min:15,max:150}}" width="30%">Duration</th>
      </tr>
   </thead>
</table>
   var data_grid_ops=$.extend(true,{},   DEFAULT_DATAGRID_OPTIONS,{
      pagination:false,
      toolbar: "#tb",
      fit:false,
      data:[{"day_of_week":"1","day":"Monday"},{"day_of_week":"2","day":"Tuesday"},{"day_of_week":"3","day"
:"Wednesday"},{"day_of_week":"4","day":"Thursday"},{"day_of_week":"5","day":"Friday"},{"day_of_week"
:"6","day":"Staturday"},{"day_of_week":"7","day":"Sunday"}]   
   });
   $("#cn_datagrid_table").edatagrid(data_grid_ops);      

2)Check on some rows, double click a table row to edit data and click "save row" which call $('#cn_datagrid_table').edatagrid('saveRow')
3)Click "showDebugInfo" , it shows checked row data info.
function showDebugInfo(){
    var row=$("#cn_datagrid_table").datagrid("getChecked");
    if(row!=null && row.length>0){
        $.messager.alert("Message","Checked rows:<br>"+JSON.stringify(row),"info").window({width:800,resizable:true}).window("center");         
    }else{
        $.messager.alert("Message","no row checked.","info");
    }
}

The edatagrid (http://www.jeasyui.com/extension/edatagrid.php) works fine in easyui1.4.5 until I upgrade to version 1.5.
After I checked a row, edit it and save row, I click "showDebugInfo", it showed "no row checked."
Then I manually uncheck and check this row, click "showDebugInfo" again, it showed the checked row info now.
Keep the row checked, I edit the row again, click save row, the  "showDebugInfo" shows "no row checked."

So the issue is that the datagrid getChecked function lose efficacy after "endEdit".
Now I have to downgrade to easyui 1.4.5.  Hope the easyui team can fix this issue soon.

3  General Category / EasyUI for jQuery / How to update dagagrid rownumbers column when pager number change ? on: October 19, 2015, 02:27:08 AM
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")
When user click next/preous on datagrid pager, the datagrid data updated, but the rownumbers column is still for page No.1
How to update the rownumbers column  either ?

Here's my code snaphost:
datalist_obj=$("#"+tableId).datagrid({  
   pagination:true,
   rownumbers:true
});
datalist_obj.datagrid("getPager").pagination({
   pageSize: DEFAULT_PAGE_SIZE,
   pageList:[DEFAULT_PAGE_SIZE,100,200],
   onSelectPage:function(pageNumber, pageSize){       
      query_data_list(pageNumber, pageSize);      
   }          
});

$(document).ready(function() {
   query_data_list(1,DEFAULT_PAGE_SIZE);
});   

function query_data_list(pageNumber,pageSize){
   var ajaxData=new Object();
   ajaxData.pageNumber=pageNumber;
   ajaxData.pageSize=pageSize;   
   var tableId="data_list_table";
   
   $("#"+tableId).datagrid("loading");
      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.
                 $("#"+tableId).datagrid("loaded");
       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); //datagrid pager changed, but rownumbers column not updated.      
         }
      );      
}
4  General Category / EasyUI for jQuery / Re: Datagrid loading/loaded method do not work on IE and chrome. 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.
5  General Category / EasyUI for jQuery / Datagrid loading/loaded method do not work on IE and chrome. 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
      }
   );   
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!