SpreadJS Documentation
Changing the Default Input Map

You can change the default key actions.

Using Code

This example changes default up and down actions to page up and page down when changing the active cell.

JavaScript
Copy Code
$(document).ready(function () {
    var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3});
    var activeSheet = spread.getActiveSheet();

    //Change Up key action in cells to "Page Up".
    activeSheet.addKeyMap(GcSpread.Sheets.Key.up, false, false, false, false, GcSpread.Sheets.SpreadActions.navigationPageUp);

    //Change Down key action in cells to "Page Down".
    activeSheet.addKeyMap(GcSpread.Sheets.Key.down, false, false, false, false, GcSpread.Sheets.SpreadActions.navigationPageDown);
});
See Also

Developer's Guide

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.