easyui datagrid修改属性,扩展组件的使用

<table id="table"></table>
$(function(){
        $("#table").datagrid({
            fit:true,
            fitColumns:true,
            autoRowHeight:false,
            method:'get',
            idField:'dm',
            toolbar:'#ts',
            onBeforeDragColumn:function(a,b,c){
    //这是扩展ext组件的事件
                console.log(a,b,c)
            },
            onStopDragColumn:function(a,b,c){
    //这是扩展ext组件的事件
                console.log(a,b,c)
            } 
        }).datagrid('columnMoving') //这就是扩展的组件
})    

 

想要修改#table的datagrid的某个属性,需要使用其options方法,比如修改fit为false,easyui 使用扩展组件时,先引用其方法,比如当使用datagrid的ext方法时,使用如上所示columnMoving

$("#table").datagrid("options").fit = false

 

posted @ 2020-05-30 12:12  大尹  阅读(561)  评论(0编辑  收藏  举报