需要你这边自定义一个Radio。- function MyCellType() {
- }
- MyCellType.prototype = new GcSpread.Sheets.CustomCellType();
- MyCellType.prototype.paint = function (ctx, value, x, y, w, h, style, options) {
- //Paints a cell on the canvas.
- };
- MyCellType.prototype.createEditorElement = function() {
- //Creates a DOM element then returns it.
- };
- MyCellType.prototype.getEditorValue = function(editorContext) {
- //Gets the editor's value.
- };
- MyCellType.prototype.setEditorValue = function(editorContext, value) {
- //Sets the editor's value.
- };
- MyCellType.prototype.activateEditor = function(editorContext, cellStyle, cellRect) {
- //Activates the editor, including setting properties or attributes for the editor and binding events for the editor.
- };
- //... the other methods implements
- sheet.getColumn(1).cellType(new MyCellType());
复制代码 |