当前位置:网站首页>EasyUI learn to organize notes

EasyUI learn to organize notes

2022-07-07 11:30:00 51CTO

@[toc]
I'm interested in easyui Take notes , Update from time to time

(1) Table double click event

datagrid and treegrid All applicable , Example :

      
      

onDblClickRow :function(rowIndex,rowData){
var selections = $("#areaList").datagrid('getSelections');
var areaSeq = selections[0].areaSeq;
var areaName = selections[0].areaName;
var status = selections[0].tipsAreaRelaStatus;
if(status =='1'){
$.messager.alert(" Operation hint "," This prompt has been configured , Continue to configure data will overwrite old data !","warning");
return;
}
treeOption.addNodeToList(1,areaSeq,areaName,status);
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.

(2) treegrid Send parameter update

      
      
var jsonData = {'queryFlag':flag,
   'areaName':$('#areaName').val()
};
$('#areaList').treegrid({
queryParams: jsonData
});
var params = $("#areaList").treegrid("options").queryParams;
$("#areaList").treegrid("options").queryParams=params;
$("#areaList").treegrid("reload")
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.

(3) Settings list checkbox The radio

easyui Set up checkbox The radio :singleSelect : true

(4) Easyui Realize single line selection and deselection

      
      
var isCheckFlag = true;
$('#flowList').datagrid({
....
onClickCell:function(rowIndex,field,value){
isCheckFlag = false;
},
onSelect:function(rowIndex,rowData){
if(!isCheckFlag){
$(this).datagrid('unselectAll');
isCheckFlag = true;
$(this).datagrid('selectRow', rowIndex);
}
},
onUnselect:function(rowIndex,rowData){
if(!isCheckFlag) {
isCheckFlag = true;
$(this).datagrid('unselectRow', rowIndex);
}
}
});
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
原网站

版权声明
本文为[51CTO]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207070933346119.html