I have a spreadsheet with a fixed number of rows and columns. How can I make the spreadsheet show just that range of cells? Currently the scroll bars reflect the rows and columns the user COULD move to rather than just the rows and columns I want the user to actually work on. They can also click on cells outside of that area, which for what I am using it for, looks a bi
|
<ejs-spreadsheet
ref="spreadsheet"
:scrollSettings="scrollSettings"
>
<e-sheets>
<e-sheet name="Shipment Details" rowCount="20" colCount="6">
</e-sheet>
</e-sheets>
</ejs-spreadsheet>
scrollSettings: {
isFinite: true,
enableVirtualization: false,
},
|
Works great. Thanks very much
Actually I take that back. If I do it as per your example, yes it works great.
However, I can't bind it properly.
<e-sheet name="Shipment Details" :rowCount="rowCount" colCount="colCount">
This works on the initial values of rowCount and colCount. But when I get my datasource, I want to set those values based on the rows and columns I have in the data. But if I change those values in code, the spreadsheet doesn't update.
Same thing if I set in code:
spreadsheetInstance.sheets[0].rowCount = (1 + self.listData.length);
I have to call refresh() on the spreadsheet but then that causes its own issues. refresh() seems to ignore my column widths and does an autofit. When you click in the cells they are the right size but they don't display correctly.
So basically at the moment, I don't have a working solution.
I am using 19.1.57 so not sure if these issues have been fixed in newer versions. I can't go to newer version because of https://www.syncfusion.com/forums/166801/broken-version-when-upgrading
Had a look at your example and can see that it works. However, same thing not quite working in my code. I have to add:
setTimeout(function () {
spreadsheet.refresh(); }, 50);then everything works fine.
I was on an older version where the refresh wasn't working properly (had issues with using latest version which another helpful person at SyncFusion helped with) but with the latest version the refresh now seems to work ok.
Thanks
Jeff