Dynamically changed Dropdown choices isn't reflected after reload.

QuestionsDynamically changed Dropdown choices isn't reflected after reload.
Warren Davis asked 1 month ago

I have a column field that is set through a dropdown menu

$col["edittype"] = "select";

My design constraint is that once a value in the dropdown has been selected, it is no longer available as a choice. I have put logic in to correctly determine which choices are available…

$choices = getMilestoneDropdownChoices("msDescrip");  // my function
$col["editoptions"] = array("value"=>$choices);

so for example, if my choices are initially  (“0:A,1:B,2:C,3:D”)   and the user opens the dropdown and selects C, then my function would return  (“0:A,1:B,3:D”)  next time.  This works correctly. However, the dropdown doesn’t reflect that change until I reload the page.  Reloading the Grid (using the Reload Grid icon or through code) doesn’t cause the dropdown to be updated.

How can I get this to work?

Thanks!

1 Answers
pcattani answered 5 days ago

This may not be the solution you’re looking for, but you could reload the page using javascript in your function…

Your Answer

10 + 16 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?