The popup widget provides a setOptions() method that allows to update the options after initialization (as documented here: https://docs.telerik.com/kendo-ui/api/javascript/ui/popup/methods/setoptions). However, setOptions does not update the collision settings. This can be witnessed in the following DOJO: https://dojo.telerik.com/UbiKumIg.
When reducing the window size until the popup is forced to change its position, it still uses the "fit"-behavior, although setOptions() has been called with "fit".
A quick check in the sources revealed that the widget caches the collision settings internally in a form that is easier to work with than the configuration string. However it is never updated on setOptions().
Hello Michael,
The suggested feature is not in our roadmap yet. We will continue to monitor the interest in the request and the votes the issue gathers and based on the demand we will consider adding the feature for implementation.
Regards,
Neli
Progress Telerik
Hello,
I am afraid that the setOptions method could not be used for all the properties in every widget. As described in the following link from the documentation - Depending on the widget, some properties may not be changed, and the method's implementation varies for each widget.
- https://docs.telerik.com/kendo-ui/api/javascript/ui/widget/methods/setoptions
Thus, I am changing the type of the thread to Feature Request. This way, the other users in the community could vote for the issue.
If it is suitable for your scenario you could try to destroy and recreate the Popup widget with the new options.
- https://docs.telerik.com/kendo-ui/intro/widget-basics/destroy
Here is a Dojo example where the approach from the article is used for the Popup widget.
I hope this helps.
Regards,
Neli
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.