I would like to provide variable row height depending upon the content size. is it possible in Slickgrid?
Can you point me towards any examples?
I would like to provide variable row height depending upon the content size. is it possible in Slickgrid?
Can you point me towards any examples?
I have implemented this in my project, with the help of @Stephen Robinson 's answer here.
If anyone is interested they can check:
https://github.com/vihari/Seaview/blob/version3.0/SlickGrid-master/slick.grid.js.
It can be enabled with the file above if you set options.enableWrap to true.
Thank you.
Plain and simple, this is not supported in SlickGrid and likely will never be. Sorry.
As non of the forks of SlickGrid are really viable options in many regards, I thought it would be valuable to many readers of this post to discuss alternatives to SlickGrid.
I consider 'viable alternatives' that fully support variable row height to be: each row can have a different row height that automatically adapts to fit the content, and lets the text wrap to the next line.
I have looked into this quite extensively, and unfortunately I have not found viable alternatives that are related to SlickGrid. Of other alternatives, I have only found one that is free for commercial use - dojox DataGrid, however it is not clear how you could use custom editors with this (most commercial ones offer this).
There are quite a few viable alternatives that require payment for commercial use: dhtmlxGrid, jQuery EasyUI DataGrid, jQWidgets, Wijmo Grid widget, JideTable, and Sencha ExtJS Grids. Of these, I would personally say the best is dhtmlxGrid http://dhtmlx.com/docs/products/dhtmlxGrid/ - Free version is GPL, Pro version is $199.
I've recently forked SlickGrid to add in a bunch of new features - including variable (and resizable) rows. You can try it here: https://github.com/globexdesigns/doby-grid
As a summary of the above options none of them are official, supported and production ready. Even the doby-grid option (more supported) is still listed as not production ready.
Note, there are also differences between:
Surprisingly, with all of the SlickGrid variants above (and many other DataGrid libraries), you might get one or two of the above, but not all three.
If you are not so concerned about official, supported and production ready, then this is my impressions from testing the 3 SlickGrid variants listed above:
Seaview
JLynch7
doby-grid
Define this variable outside....
var tableHeight = 0;
Before creating the slick grid, use below the lines:
// 30 px for each line this will cover the header... You can adjust this value for your table.
If user changes the screen when page is already generated, the below will resize the table based on screen and number of rows of data: