Spreadsheet - Change Font Size & Font Family after loading

0 Answers 267 Views
Spreadsheet
Brian
Top achievements
Rank 1
Iron
Brian asked on 07 Apr 2022, 07:53 AM

Hi,

I am looking for a way to change the font size & font family after the spreadsheet is loaded.

I know that this can be done when we loop through all the cells and set it individually, i am looking for a more elegant way to do in a sheet/control level. Is it possible?

I saw the defaultCellStyle attribute but i am not able to get it working even changing the values.

TIA

Regards,

Brian

Brian
Top achievements
Rank 1
Iron
commented on 08 Apr 2022, 02:33 AM

I manage to find the answer.. During on load of the control, we can add in the default settings so that it will render out eventually. before is a snippet:

var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
spreadsheet.options.defaultCellStyle.fontSize = 12;
spreadsheet.options.defaultCellStyle.fontFamily = 'Verdana';

No answers yet. Maybe you can help?

Tags
Spreadsheet
Asked by
Brian
Top achievements
Rank 1
Iron
Share this question
or