已解决,增加删除按钮,根据ID删除表记录,在页面加载命令中增加单击表格获取ID单元格的JS命令如下:var listview=Forguncy.Page.getListView("表格1");
var spread=listview.getControl();
var sheet = spread.getActiveSheet()
sheet.bind(GC.Spread.Sheets.Events.SelectionChanged, function(a,b){
console.log(b);
var row=b.sheet.getActiveRowIndex()+1;
var col=b.sheet.getActiveColumnIndex()+1;
// var val=listview.getValue(row-1,col-1); //获取选中的单元格的值
var val=listview.getValue(row-1,0); //获取选中行ID单元格的值
var colName=b.sheet.getValue(0, b.sheet.getActiveColumnIndex(),
GC.Spread.Sheets.SheetArea.colHeader);
// Forguncy.Page.getCell("hang").setValue(row);
// Forguncy.Page.getCell("lie").setValue(col);
// Forguncy.Page.getCell("biaoti").setValue(colName);
Forguncy.Page.getCell("HangID").setValue(val);
}
); |