I just wanna format design with own UX, and I have to resize cell’s height, I can’t find any solution. In the Menu, I find a method named ‘resizeRow’, that’s what am I need, but I don’t know how to use this method in the code, could you please tell me how to do this?
Hey @felix, resizeRow
is a property that allows you to manually resize the rows of the datatable part of your spreadsheet, by default it is set to true
for spreadsheets.
What you are looking for is probably something in the realms of this:
https://snippet.webix.com/94wj7jor.
Please take a look, there are 2 cases covered here:
-
You can set the
rowHeight
of every element in your current skin by setting yourwebix.skin.$active.rowHeight
value to whatever height you need. Note that this will resize every element that has arowHeight
property as well. -
Alternatively you can set the height for a specific range of rows via
$$("ss").setRowHeight([1,50],26)
, where your first argument is the range of your rows you want to resize, and the second argument is the height.
Thanks, Dzmitry, that two opinions are super useful, especially webix.skin.$active, I don’t know this excellent method before, maybe cause I just use spreadsheets.js, and why this method can’t set columnWidth?
columnWidth
property can only be defined in the datatable config, you can’t adjust the width by referencing this property specifically, use setColumnWidth()
instead: https://snippet.webix.com/kumo4hxs
OK, I use setColumnWidth() method, and I have 4 sheets, so I will use setColumnWidth() method 4times to set columnwidth, but I can’t listener switch sheets, “onChange” event can’t worked, what should I do to listener switch sheets?
How about an onAfterSheetShow
event? https://snippet.webix.com/bknzwq3s
Thanks a lot!!!
Starting from Webix 6.4.2 you can use rowHeight
and columnWidth
properties:
https://snippet.webix.com/01j2fe63
webix.ui({
view:"spreadsheet",
toolbar:"full",
data:spreadsheet_data,
rowHeight:100,
columnWidth:250
});