您好,可以实现,只要通过SpreadJS提供的扩展自定义单元格接口即可简单实现这个功能,代码如下:
- function RaidoButtonCellType(items, size, isHorizontal) {
- this.typeName = "RaidoButtonCellType";
- }
- RaidoButtonCellType.prototype = new GC.Spread.Sheets.CellTypes.RadioButtonList();
- RaidoButtonCellType.prototype.processMouseMove = function (hitInfo) {
- var sheet = hitInfo.sheet;
- var div = sheet.getParent().getHost();
- var canvasId = div.id + "vp_vp";
- var canvas = $("#"+canvasId)[0];
- if (sheet && hitInfo.isReservedLocation) {
- canvas.style.cursor='pointer';
- return true;
- }else{
- canvas.style.cursor='default';
- }
- return false;
- };
- var radio = new RaidoButtonCellType();
复制代码
完整示例请查看附件。
|
|