SpreadJS Documentation
Setting Selection State when Editing Starts

You can select text when going into edit mode.

Using Code

This example selects the text when editing starts.

JavaScript
Copy Code
$(document).ready(function () {
    var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3});
    var sheet = spread.getActiveSheet();
    sheet.setValue(0, 0, "ABC", GcSpread.Sheets.SheetArea.viewport);
    //Set it to be always in input mode.
    spread.bind(GcSpread.Sheets.Events.EnterCell, function (event, data) {
        var activeSheet = data.sheet;
        activeSheet.startEdit(true);
    });
});

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.