jquery easyui 맞춤법 테이블의 예 공유

5289 단어 jqueryeasyui조인트
프로젝트에서는 jquery easyui를 사용하고 DataGrid Packetable을 사용하며 예를 기록합니다.

  
  
  
  
  1. function setProductData(){ 
  2.     var  rows = $("#commonProductListTable").datagrid("getSelections"); 
  3.     var proArray = new Array(); 
  4.     for(var i in rows){ 
  5.         var a = { 
  6.             chk:rows[i]['productId'], 
  7.             productCode:rows[i]['productCode'], 
  8.             productName:rows[i]['productName'], 
  9.             shopName:rows[i]['shopName'], 
  10.             categoryName:rows[i]['categoryName'], 
  11.             state:rows[i]['state'], 
  12.             isVirtual:rows[i]['isVirtual'], 
  13.             productType:rows[i]['productType'
  14.         }; 
  15.         proArray.push(a); 
  16.     } 
  17.      
  18.     $("#setdata").datagrid({ 
  19.         columns:[[ 
  20.             {field:'chk',checkbox:'true',width:'50'}, 
  21.             {field:'productCode',title:' ',editor:'text',width:'150'}, 
  22.             {field:'productName',title:' ',editor:'text',width:'250'}, 
  23.             {field:'shopName',title:' ',editor:'text',width:'150'}, 
  24.             {field:'categoryName',title:' ',editor:'text',width:'180'}, 
  25.             {field:'state',title:' ',editor:'text',width:'100'}, 
  26.             {field:'isVirtual',title:' ',editor:'text',width:'100'}, 
  27.             {field:'productType',title:' ',editor:'text',width:'100'
  28.         ]] 
  29.     }).datagrid('loadData',proArray).datagrid('acceptChanges'); 
  30. , , row, row 。

좋은 웹페이지 즐겨찾기