jQuery UI Widgets › Forums › TreeGrid › Setting the Height of the TreeGrid at runtime
This topic contains 13 replies, has 3 voices, and was last updated by Peter Stoev 10 years, 8 months ago.
-
Author
-
Hi,
I’m trying to set the height of the TreeGrid at runtime, but it doesn’t seem to work…
I’m using the following statement:$(“#treeGrid”).jqxTreeGrid(‘height’, 260);
When checking the height before and after, I can see that the height indeed is changed, but the grid is not responding to the changes… Do I need to refresh the TreeGrid somehow?
Thanks!
Jon
Hi Jon,
How do you expect the widget to respond on setting height?
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
I think I may have made my self unclear when I say that the grid’s height “indeed changed”. What I meant was that when I check the object itself (debugging the Javascript code), I can see that the “height” property do change from e.g 400 to 200, but the actual rendering of the TreeGrid is not affected. Meaning, the TreeGrid doesn’t respond.
I’ve tested this With the “jqxGrid” widget , and it works just fine, but not with the jqxTreeGrid…
Jon
Hi Jon,
Ok, Thank you for the feedback.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi,
Does this mean that this actually doesn’t work? Is this something that will be fixed? Is there any workarounds?
Thanks!
Jon
Hi Jon,
There is no workaround which we can offer you. Yes, it would be fixed in a future version.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comOk, thanks Peter.
Can you say something about when this fix might be available?
Unfortunately, this is a kind of showstopper for me…Jon
Hi Jon,
The next release is planned for 28 March. I am sorry that setting dynamically the “height” property is a show stopper for you. May be you can simply use 100% height, put the widget within a container DIV tag and change the height of the container.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
I can live with the fix not being available before 28 of march, as long as I can count on the fix being in that release…
(The 100% + DIV approach was, unfortunately, not quite right, the layout became slow an unresponsive with large datasets…)
Thanks!
Hi Jon,
For large data sets, you need to enable the widget’s Paging. That is the only way to make the TreeGrid to load multiple records and to be with good performance.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
I’m hoping for the fix as well.
I started looking at the render method but that also re-fetches the data which is not ideal. Should it do that?Regards,
Peter M.Hi Peter M.
I don’t know what you saw in the render method, because that is internal API and also it does not re-fetch data. The render method renders the widget after the binding is completed and that’s it
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
I did a quick fiddle using your render example that shows that it does re-fetch the data.
http://jsfiddle.net/UMvJB/In my real application, I’m using a remote json call and it’s going back to the server on a render call.
Regards,
Peter M.Ok, thank you! I suppose it should. My mistake, sorry. You may use “refresh” to repaint it only.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.