Is variable rowheight a possibility in SlickGrid?

前端 未结 10 907
离开以前
离开以前 2020-12-03 01:22

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?

10条回答
  •  再見小時候
    2020-12-03 01:55

    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:

    • Row height can be changed separately for each row.
    • The text can wrap around to the next line.
    • The row height can automatically adjust to fit the content.

    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

    • Users report problems with only displaying white, not tested with editing cells (warning), pagination may not work (warning).
    • My test of the demo found that it wrapped text and automatically varied the cell height ok, but has a bug that rows/borders are off by a few pixels. So may be usable, but not production ready.
    • I tried downloading and using it. It has wrapping of text in cells - good. Its auto adjusting of cell height is very broken/incomplete, which makes wrapping of text practically useless (unless you fix row height - not great). I have partly fixed the auto adjusting of cell height, but quite a bit more work to be done. Not a simple task. Does not work out of the box. Definitely not production ready.

    JLynch7

    • No demo to run without downloading.
    • I tried downloading and using it. It is buggy (I had to fix it to get it working), adds variable row height, but does NOT seem to wrap the text and does NOT auto adjust the row height based on the text!. It is not actively maintained. And not very popular, so not very well supported. Seaview seems to be more advanced, even though its "auto adjust the row height" feature is broken.

    doby-grid

    • Is in alpha - not production ready. Seems like a considerable fork - many changes.
    • I tried it. Getting started is confusing, but got it working. Needs bowser and Require JS.
    • options.resizableRows is half of what we want - you can manually change row heights dynamically. BUT there is not auto re-sizing of row heights to fit the content!!??!!
    • This issue states that "Adding a truly dynamic row height (which is affected by the row's content) will require us to disable a lot of the features.". They offer a couple of possible solutions, but one determined dev tried this and had a lot of trouble with it. He might have made it work, or he might have given up. I am not going to risk it.

提交回复
热议问题