how to limit or statically fix the number of rows and columns in a grid lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- witenite · 2017-02-14 09:43 When using FPSpreadsheet, how can I go about fixing the number of columns/rows. I am well aware of RowCount and ColCount, and they work in terms of bringing the grid down to a clearly defined size, however if the user scrolls down or right, new rows/columns are dynamically added to the grid. How do I inhibit that sort of user action/interaction with my grid? Is there an existing flag I can disable to do this, or do I need to write a procedural event to capture an attempt to scroll outside of the boundaries of the grid? ---------------------------------------------------------------------- wp · 2017-02-14 23:48 Please see "AutoExpand" in http://wiki.lazarus.freepascal.org/TsWorksh eetGrid#New_grid_properties. Turn off aeNavigation if you don't want the user to navigate outside the predefined grid size.Turn off aeData if you don't want to write cells outside the predefined grid size (attempting this would raise an exception then).Turn off aeDefault if you have several sheets, use the same grid in a TsWorkbookTabControl, and don't want smaller grids to expand to default size (set by DEFAULT_ROW_COUNT and DEFAULT_COL_COUNT). ---------------------------------------------------------------------- witenite · 2017-02-20 08:21 Thanks! Exactly what I was looking for. Found more details online too here: http://wiki.freepascal.org/TsWorksheetGrid#Merged_cells