Editor Dependent - Simple Question
Editor Dependent - Simple Question
edanyildiz
Posts: 43Questions: 13Answers: 4
Hi, i would like to ask a simple question.
How can i disable Editor Dependent to be fired when the editor form is created.
I mean,
{event : change}
Cause i have a select box in the form which fills another field upon change.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
There is no option for that. The reason being that when you start an edit, the existing value will be set and used. Likewise when creating a new row, the default value will be set and the dependent method will update based on that.
Allan
If i use condition for initcomplete for editor, will it be a solution?
Possibly - but I'm not sure I really understand how you would use it. I don't actually even fully understand the problem.
Allan
Hi Allan,
Here is the screen shot of the editor form.
I have a select box, and a note field.
When the user changes the option in the select box, it fills the note field with predefined values. We can say they are offer details like a template.
It is working, but the only problem is, when i edit a record, i need to stop select box being fired at the beginning.
Thanks for the details. For this I would recommend not using
dependent()
, but that rather use a simplechange
event - e.g.:When the value is being set by Editor you can use
if ( d && d.editor ) { ... }
to check for this. If the value is set by the user that expression will not be true.Allan
Thank you Allan,
Got it working