如日期的Client-side Editing实现:
function beforeCellEdit(e, args) {
if (args.cell.column().dataField === "ShippedDate") {
$("<input />")
.width("100%")
.appendTo(args.cell.container().empty())
.wijinputdate({
date: args.cell.value(),
showTrigger: true
});
args.handled = true;
}
}
function beforeCellUpdate(e, args) {
if (args.cell.column().dataField === "ShippedDate") {
args.value = args.cell.container()
.find("input")
.wijinputdate("option", "date");
}
}
function afterCellEdit(e, args) {
if (args.cell.column().dataField === "ShippedDate") {
args.cell.container()
.find("input")
.wijinputdate("destroy");
}
}
如果是下拉选择控件应该怎么写? |