jQWidgets Forums
jQuery UI Widgets › Forums › Angular › Treegrid expanded feature Undefined by default
This topic contains 4 replies, has 2 voices, and was last updated by Hristo 5 years, 8 months ago.
-
Author
-
Hi,
We need your help:We are working with a Treegrid.
The expanded property of the nodes is defined as undefined by default, so when a node is expanded for the first time, it does not go through the RowExpand event but through the RowClick, when the expanded property of the node is set to false, although it should be set to true as it has been expanded.
Is there a any way that the expanded property could be set to false by default?
Is this a bug or how do we have to proceed in order to have the node expanded property to false by default?? Or could you provide us with a simple example in order to get an idea to use it correctly.
In that case, we would be able to control it but with the undefined property we don’t know how to handle with it.Kind regards,
Nekane fontalHi,
i forgot to tell you that we are working with the version 8.3.2 Release Sept 2019
Kind regards,
Nekane FontalHello Nekane Fontal,
I am not absolutely sure what you want to achieve but I would like to suggest you try to use the “beforeLoadComplete” callback of the jqxDataAdapter to override something in your records.
Please, take a look at this example.
I hope this will help.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comHi,
thank you very much we were able to resolve this issue, but on the other hand, we still have another related problem: The FIRST time we are expanding a node (now, as you have shown us, before expanding the treegrid, we are able to initialize the property Expanded to false), the event rowClick is triggered but we would need that rowExpand Event is triggred, as in the evnet rowClick we do not know how to check if the node was expanded or selected for the first time.
Could you please explain us why the rowExpand event is not triggered the first time a node is expanded or how can we implement that behaviour, in order that Expanded property is set to true when the first time a node is expanded. the second time a node is expanded, the Expanded property is being set to True correctly, but not for the first time.
If you could provide us with a simple example of this behaviour, it would be very helpful.
Best Regards,
Nekane FontalHello Nekane Fontal,
The event is attached after the initialization of the component.
You expand these items programmatically and then you know when exactly they are expanded.
If you do not know you could use thebeforeLoadComplete
callback to check this.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.