Cannot find a way to trigger binding with parameter

3 posts, 0 answers
  1. Hermann
    Hermann avatar
    5 posts
    Member since:
    Jan 2018

    Posted 30 Apr 2019 Link to this post

    I have a tag like this
    <button data-bind="attr: { data-placeholder: Placeholder(512) }" />

    Usually I trigger the change like this: model.trigger('change', { field: 'Placeholder'}) but this doesn't work in this case.

    Could anyone help me?


  2. Hermann
    Hermann avatar
    5 posts
    Member since:
    Jan 2018

    Posted 02 May 2019 in reply to Hermann Link to this post

    Have found the Solution, thanks.
  3. Dimitar
    Dimitar avatar
    812 posts

    Posted 02 May 2019 Link to this post

    Hello Hermann,

    I have prepared a Dojo example that demonstrates a similar scenario to the one described - programmaticaly triggering the view model change. With it, the change handler of the view model is being successfully executed with the following code:
    <div id="example">
      <button class="k-button"
       data-bind="attr: { data-placeholder: Placeholder(512) }"
       style="width: 180px">Click me
      var viewModel = kendo.observable({
        Placeholder: function(val) {
          this.trigger('change', { field: 'Placeholder'})
          return val;
      viewModel.bind("change", function (e) {
      kendo.bind($("#example"), viewModel);

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top