How to render Spreadsheet in Full Screen Mode?
This article explains how to render a JavaScript Spreadsheet in Full-Screen Mode. Use the client-side created event to achieve this requirement. Set the document's client height to the spreadsheet's height property to render it full-screen mode.
[HTML]
<div id="spreadsheet"></div>
[TS]
//Initialize the spreadsheet component. let spreadsheet: Spreadsheet = new Spreadsheet({ sheets: [ { name: 'Car Sales Report', ranges: [{ dataSource: (dataSource as any).defaultData }], columns: [ { width: 180 }, { width: 130 }, { width: 130 }, { width: 180 }, { width: 130 }, { width: 120 }, ], }, ], created: (): void => { //Apply cell and number formatting to specify a range of the active sheet. spreadsheet.cellFormat( { fontWeight: 'bold', textAlign: 'center', verticalAlign: 'middle' }, 'A1:F1' ); spreadsheet.height = document.documentElement.clientHeight; //Set height for a spreadsheet at initial load. window.addEventListener('resize', function () { //Set height for a spreadsheet while resizing the window. spreadsheet.height = document.documentElement.clientHeight; }); }, }); //Render the initialized spreadsheet component. spreadsheet.appendTo('#spreadsheet');
Sample Link: https://stackblitz.com/edit/c42djg
Output:
Documentation:
https://ej2.syncfusion.com/documentation/spreadsheet/mobile-responsiveness/
Conclusion
We hope you enjoyed learning about how to render Spreadsheet in Full Screen Mode.
You can refer to our JavaScript Spreadsheet page to learn about its other groundbreaking feature representations. You can also explore our JavaScript Spreadsheet Documentation to understand how to manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!