Completed
Last Updated: 21 Jan 2020 12:48 by ADMIN
Euan
Created on: 27 Feb 2014 13:19
Category: Data Source
Type: Feature Request
13
Add text binding support for buttons
I would like to be able to dynamically update the text in my button by binding to a viewmodel.

Thanks
1 comment
Euan
Posted on: 27 Feb 2014 15:19
If it helps my custom binder to solve the issue is:

kendo.data.binders.widget.buttonText = kendo.data.Binder.extend({
    refresh: function () {
      var text = this.bindings.buttonText.get();
      if (text == null) {
        text = "";
      }
      $(this.element.element).contents().filter(function() {
        if (this.nodeType == Node.TEXT_NODE) {
          this.nodeValue = text;
        }
      });
    }
  });