jQuery MiniUI
标题:
drawcell的使用很不解的地方
[打印本页]
作者:
ioco
时间:
2016-6-1 23:30:46
标题:
drawcell的使用很不解的地方
通常我想在特定单元格加入一个控件,如果不写原生html,带入class="mini-xxxx"就无法生效(mini-button有效,生成单元格按钮)。然后我试着写成单元格编辑,在列下面的编辑控件(class="mini-xxxx"),然后drawcell判断情况再进行展示或禁用,但是拿不到这个控件对象,我观察了只有在e.cloumn.editor中有控件的属性(并不是该控件DOM),修改它无效,修改样式也是无效的。
虽然我用过它很多次,但每次都得尝试用不同的使用方式
grid2.on("drawcell", function (e) {
if (e.field == "PropertyChargeEndTime" && e.record.PropertyChargeEndTime == null) {
e.cellCls = "mini-datepicker";
e.cellHtml = '<input property="editor" type="text" class="mini-datepicker" showClearButton="true" showTodayButton="true"/>';
e.cellStyle = "width:100%;";
console.log(e);
}
});
复制代码
作者:
dforce
时间:
2016-6-2 09:29:21
drawcell只能绘制html,不能绘制miniui控件
表格的编辑器在开始编辑的时候才创建
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2