I'm currenty using MVVM across all my UI and it's working great but I have one small issue with a button inside a footer template which doesn't call the function inside my view model.
I include in attachment an example showing my issue.
1 Answer, 1 is accepted
0
Dimitar
Telerik team
answered on 17 Aug 2017, 12:55 PM
Hello Francis,
On the following Dojo example you can find a modified version of the provided example, where the click binding in the footer template of the DropDownList widget works correctly.
To achieve the desired result, I have used the DropDownList's open event to bind the model to the footer template, which is outside of the binding container:
onOpen: function(e) {
var footer = $(e.sender.popup.element).find(".k-footer")
Still the solution you provided doesn't work . And the Dojo link example is not working.
Neli
Telerik team
commented on 23 Mar 2022, 07:41 AM
Hi Ishtiyaque,
I tested the Dojo example provided by my colleague Dimitar and it is working as expected on my side. When the 'Add' button in the DropDownList footer is clicked and an alert appears. The example uses an old version - 2017.2.621. For the same example to works as expected with the latest version the selector for the footer element needs to be changed as demonstrated below:
var footer = $(e.sender.popup.element).find(".k-list-footer")