jQuery UI Widgets › Forums › TreeGrid › [Bug] TreeGrid Container height is not recalculated if cell expand after edit
Tagged: angular treegrid, bootstrap treegrid, javascript treegrid, jquery treegrid, jqwidgets treegrid, jqxtreeGrid autoRowHeight render
This topic contains 2 replies, has 2 voices, and was last updated by Christopher 7 years, 9 months ago.
-
Author
-
December 14, 2016 at 4:27 pm [Bug] TreeGrid Container height is not recalculated if cell expand after edit #89838
Hi,
I’ve located a bug in the treegrid component :
If you edit inline a treegrid row, and if your text is too long to fit inside the cell, the text will wrap, increasing the height of the cell. However, the overall height of the treegrid will not increase, truncating the last line(s). The component seem to recalculate the good height if you insert a row or if you collapse/uncollapse a branch of the treegrid.
You can try it here : http://jsfiddle.net/Vq76M/21/
Just edit a cell and input more than the cell width, you will see it directly !A call to the refresh or render function don’t have any effect…
I’m still trying to find a workaround.
December 15, 2016 at 1:11 pm [Bug] TreeGrid Container height is not recalculated if cell expand after edit #89874Ok, I found a workaround but it’s a VERY UGLY one :
let resetHeigthLock = false; $("#myDataGrid").on('rowEndEdit', function (event) { if (!resetHeigthLock) { resetHeigthLock = true; setTimeout(function () { $("#myDataGrid").jqxTreeGrid('addRow', "resetHeigth", {}, 'last', null); $("#myDataGrid").jqxTreeGrid('deleteRow', "resetHeigth"); setTimeout(function () { resetHeigthLock = false; }, 50); }, 50); } });
Basicly on the rowEndEdit event, I manually add and remove a line for the component to recalculate his heigth.
Here you need to use a timeout function because it seem for an unknonw reason the deleteRow function trigger the rowEndEdit event, leading to an endless loop and a stack overflow.This is still a big bug but at least it can be circonvented somehow…
December 16, 2016 at 2:46 pm [Bug] TreeGrid Container height is not recalculated if cell expand after edit #89911Hi ratchetclank,
Thank you for your feedback. You could set the
autoRowHeight
property to “false” so the height of the cell won’t change.Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.