function fun() {
var xlObj = $("#Spreadsheet").ejSpreadsheet("instance");
xlObj.XLValidate.applyDVRules(xlObj.XLSelection.selectRow(1), ["Between", "15", "20"], "number", true, true);
} |
function actionComplete(args) {
if (args.action == "insertRow") {
var xlObj = $("#Spreadsheet").ejSpreadsheet("instance"), range, splitData, rule, rng, options, fillRange;
rule = xlObj.XLEdit.getPropertyValue(args.startCell.rowIndex - 1, args.startCell.colIndex, "rule", args.sheetIndex);
splitData = rule.customVal.split("_");
rng = this.getRangeIndices((splitData[1] === "list") ? splitData[3] : splitData[6]);
range = this.getAlphaRange(rng[0], rng[1], rng[2], rng[3]);
fillRange = this.getAlphaRange(rng[2] + 1, rng[1], rng[2] + 1, rng[3]);
xlObj.XLSelection.selectRange(fillRange);
options = { dataRange: range, direction: "down", fillRange: fillRange, fillType: ej.Spreadsheet.AutoFillOptions.CopyCells }
xlObj.XLDragFill.autoFill(options);
xlObj.clearContents(fillRange);
}
}
function btnClick() {
var xlObj = $("#Spreadsheet").ejSpreadsheet("instance");
xlObj.insertEntireRow(15, 16);
} |