jquery easyui怎么动态改数据表格上的toolbar的按钮的样式和文字

jquery easyui怎么动态改数据表格上的toolbar的按钮的样式和文字,第1张

这句代码一看就有语法错误,选择器后面跟着的应该是插件名。
你这个问题我给你分析一下,datagrid的工具栏实质上就是linkbutton,要禁用或启用一个linkbutton就要调用它的disable或enable方法,照你上面说的需求,点击修改按钮禁用本身、启用保存,代码如下:
handler : function() {// 这里是紧接着你的修改按钮的
// 注意ID为你初始化工具栏按钮对应的ID
$("#update")linkbutton("disable"); // 禁用修改按钮
$("#save")linkbutton("enable"); // 启用保存按钮
}

var width = $(window)width()-80;
var height = $(window)height()-120;
stView_layout = $('#stView_layout')layout({
width: width,
height: height
});
station_view = $('#stationView')window({
title: '测站导航',
left:50,
top:80,
width: width,
modal: false,
shadow: false,
closed: true,
height: height,
onResize:function(w,h){
if(stView_treegrid){
stView_treegridtreegrid({
width:w-20,
height:h-260
});
}
}
});

重写下面的样式就可以了
datagrid-header,
datagrid-td-rownumber {
background-color: #efefef;
background: -webkit-linear-gradient(top,#F9F9F9 0,#efefef 100%);
background: -moz-linear-gradient(top,#F9F9F9 0,#efefef 100%);
background: -o-linear-gradient(top,#F9F9F9 0,#efefef 100%);
background: linear-gradient(to bottom,#F9F9F9 0,#efefef 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransformMicrosoftgradient(startColorstr=#F9F9F9,endColorstr=#efefef,GradientType=0);
}


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/13365416.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-07-22
下一篇 2023-07-22

发表评论

登录后才能评论

评论列表(0条)

保存