Page 1 of 1

JQDynaTreeOptionsQueryActivate?

PostPosted: 17 Aug 2016 16:09
by wieczy123
Hi,

how does it work? I've try:

on Event ...OptionsQueryActivate:

AParams->Values["flag"] = "false";

but the node can still be activate. Any hints?

Thanks Frank

Re: JQDynaTreeOptionsQueryActivate?

PostPosted: 18 Aug 2016 10:30
by Alexander Bulei
Hi wieczy123,

Please explain better, what do you want to do.

Best Regards.

Re: JQDynaTreeOptionsQueryActivate?

PostPosted: 18 Aug 2016 11:15
by wieczy123
Hi,

thank you for answer. That's what I want to do:

If the user click to a node in the tree I would like to decide whether the node can be activate or not. I thought I do this in the event:

JQDynaTreeOptionsQueryActive

Right?

Normaly all nodes can be activate by clicking. How can I suppress that the user can activate a node?

Thank you.

Re: JQDynaTreeOptionsQueryActivate?

PostPosted: 24 Aug 2016 08:38
by wieczy123
Please aswer.

Thank you.

Re: JQDynaTreeOptionsQueryActivate?

PostPosted: 24 Aug 2016 16:10
by Alexander Bulei
Hi wieczy123,

Sorry for delay...

Unfortunately, it's only possible via javascript...

Best Regards.

Re: JQDynaTreeOptionsQueryActivate?

PostPosted: 24 Aug 2016 20:58
by wieczy123
Thank you for answer. Can you describe, what is to do please. I *need* this fuctionality.

Best regards

Frank.

Re: JQDynaTreeOptionsQueryActivate?

PostPosted: 25 Aug 2016 09:18
by Alexander Bulei
Hi,

The javascript validation is more complex.
Please describe better your procedure/validation.

Best Regards.

Re: JQDynaTreeOptionsQueryActivate?

PostPosted: 25 Aug 2016 09:53
by wieczy123
Hi,

thank you for answer. We have many documents, which the user can edit (e.g. emails, querys, etc.). The document names are the nodes in the tree. If an user has edited a document without saving, the document should not be leaved. In actual fact we need an event "OnQueryDeActivate" or "OnQueryLeave". Because there is only the event "OnQueryActivate" we want to use this one.

We must decide at runtime wether a node is "activalible" or not. I hope you understand me? A Delphi-code snippet or a example would be very usefull.

Thank you.

Best regards

Frank.

Re: JQDynaTreeOptionsQueryActivate?

PostPosted: 25 Aug 2016 17:04
by Alexander Bulei
Hi,

I guess, now I understand you, and I guess, you have some flag in server to detect if document is saved or not.
As I said before, there is no way to send the response from delphi event..

I suggest you, block the whole tree (Enable/Disable), and then enable the tree when document is saved.

Best Regards.