發表文章

目前顯示的是有「easyUI」標籤的文章

import data (easyui datagrid, jQuery)

  1.read excel to json jquery: http://jsfiddle.net/d2atnbrt/3/ 2. easyui data grid load json file http://jsfiddle.net/xAnDj/ <div id="buttondiv" >   <input type="file" id="inputfile" />   <input type="button" id="viewfile" value="Import file" /> </div> <table class="easyui-datagrid", id="dg">     <thead>         <tr>             <th data-options="field:'EmpID'">EmpID</th>             <th data-options="field:'EmpName'">EmpName</th>             <th data-options="field:'test'">test</th>         </tr>     </thead> </table> =============== var empData = [ {"EmpID":289,"EmpName":"\u66f9\u6587\u771f","test":"test1"}, {"EmpID":290,"EmpName":"\u675c\u6c38\u5f3a","test":"t...

easyUI jQuery form ajax

1.  https://www.jeasyui.com/demo/main/index.php?plugin=Form&theme=default&dir=ltr&pitem= function loadLocal (){ $ ( '#ff' ). form ( 'load' ,{ name : 'myname' , email : 'mymail@gmail.com' , subject : 'subject' , message : 'message' , language : 'en' , accept : true }); } function loadRemote (){ $ ( '#ff' ). form ( 'load' , 'form_data1.json' ); } 2. The solution is to set the response Content-Type as text/plain. To do this I used below code http://crazytechthoughts.blogspot.com/2011/01/get-json-data-response-with-jquery-form.html 3. * I changed the line 7524 in jquery.easyui-1.3.6.js ("onload" instead "load"):  _44e.bind("onload", cb); 4. I had the same issue and fixed it by setting Content-type = "text/ht...

EasyUI入門7 datagrid根據列值設定checkbox的繫結狀態

  datagrid根據列值(True,False)設定checkbox的繫結狀態. https://www.itread01.com/content/1549477294.html //彈出角色設定視窗 function AuthoritySetting() {     //繫結新值     var row = $('#dg').datagrid('getSelected');     if (row) {         $('#dlgAuthoritySetting').dialog('open');         $('#tbxRoleCode').textbox('setValue', row.角色程式碼);         $('#tbxRoleName').textbox('setValue', row.角色名稱);         $.ajax({             contentType: "application/x-www-form-urlencoded; charset=UTF-8",             url: "../../Controller/Interface/ComAuthority.ashx?Action=BindRole",             type: "get",             data: {                 "roleCode": encodeURIComponent($('#tbxRoleCode').textbox('getText')),             }, ...

easyui datagrid可編輯表格使用經驗分享

 easyui datagrid可編輯表格使用經驗分享,  https://www.itread01.com/content/1543745120.html Name Parameter Description Method: beginEdit index 使行進入可編輯狀態 endEdit index 結束行的可編輯狀態,所做的改動將會被臨時儲存 cancelEdit index 取消編輯狀態,所做的改動將會還原。 getChanges type 獲取被更改的行資料,返回一個物件陣列,每個陣列元素的內容是對應行被修改的欄位鍵值;需要注意的是在使用acceptChanges方法之後便會清空所有變更資料,這時getChanges是獲取不到資料的。入參為type,包含以下三個值: inserted: 只獲取插入的行資料; deleted: 只獲取被刪除的行資料; updated: 只獲取欄位有更新的行資料; 如果不設定type,將會獲取所有變化的行資料 acceptChanges null 提交所有被更改的資料行,提交之後就無法使用rejectChanges方法對所作的修改做回滾操作了。 rejectChanges none 回滾所有的操作,還原為表格的最初資料,在acceptChanges之後便無法再回滾了。 validateRow index 對行資料進行校驗,全部欄位都校驗通過才返回true,入參為行的索引. getEditors index 獲取某一行的所有編輯器,注意該方法必須在beginEdit方法執行之後,endEdit方法執行之前才能獲取到編輯器,即,只有編輯狀態的行才能獲取到編輯器.返回為物件陣列,每個元素包含以下資訊: actions: the actions that the editor can do, same as the editor definition. target: 編輯器對應DOM的jQuery物件. field: 欄位的field. type: 編輯器型別, 比如 'text','combobox','datebox', 等 getEditor options 獲取某一行某一列的編輯器,注意該方法必須在beginEdit方法執行之後,endEdit方法執行之前才能獲取到編輯器,即...