Change row dropdown options based on inline change
Change row dropdown options based on inline change
stephanb
Posts: 36Questions: 11Answers: 0
Imagine I'm doing inline editing of a row, and I just changed a dropdown selection.
Is it possible to Editor.field.update() the selection options of another Editor dropdown field in that row?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Yep, you can use
dependent()
to do that. This thread goes into some depth on that,Colin
lalalala, please ignore this reply. Still working on it
I'm almost there. One thing I noticed is when I make a change to the monitored field (field '2'), DataTables POSTs a change for the secondary field (field '3') as well, even though I haven't made a selection on it yet.
Here are the relevant lines:
From my server side logs:
I don't want to set a value to '3' yet, until I actually pick one and trigger a submit.
Besides the unintended change of value to field '3', I am also having trouble getting the dropdown to show the 'label' after a change is made to '3'. I see the value, but not the name associated with it. What could that be?
If you are using
dependent()
with inline editing, you need to be using Editor 2's ability to show multiple fields inline at the same time. Is that what you are doing?dependent()
with a single field at a time just doesn't work very well.Allan
I can't use Editor 2 yet until that datetime issue I sent you a message about is resolved. Can you have a look at that for me please? I'm also not sure what you mean with showing multiple inline fields at the same time.
Once the datetime issue is fixed I'll be able to share a live setup to show what I'm doing.
I'll look at your PM in just a moment!
For what I mean with multiple inline fields at a time, see this new example.
Allan