Questions tagged [custom-binding]

KnockoutJS: Extending KnockOut JS's built-in bindings to allow a lot of flexibility to encapsulate sophisticated behaviors in an easy-to-reuse way.

156 questions
2
votes
1 answer

Knockoutjs Radio Button Group Custom Binding Not Updating on Selection

I'm trying to create a custom binding in knockout that functions like the options default binding handler but uses radio buttons instead of a dropdown. Adding an item to the array will notify the update but selecting a different radio button will…
christo8989
  • 6,442
  • 5
  • 37
  • 43
2
votes
4 answers

Managaing jQuery custom events

I've done a few hours of additional research but I still can't find a good pattern to what I would think is a common problem. I'm working on a .Net MVC2 app. Our app is made up of a main page then a number of partial views (included pages) each one…
Chris Stephens
  • 2,164
  • 2
  • 17
  • 21
2
votes
2 answers

Knockoutjs valueHasMutated not working correctly

Hopefully this will be a quick one for a knockout guru.... I'm writing a couple of custom bindings to help me translate a UI using a custom translation engine in the project I'm working on. One is to translate text, the other is to translate the…
shawty
  • 5,729
  • 2
  • 37
  • 71
2
votes
1 answer

Knockout custom binding for bootstrap select not updating viewmodel "selectedCategories/selectedCategory"

I am creating a knockout js custom binding that will allow me to use data-binding with bootstrap multiselect. I need it to work for single . I am doing it in this jsfiddle I have got it so…
BeniaminoBaggins
  • 11,202
  • 41
  • 152
  • 287
2
votes
1 answer

GoogleCharts with KnockoutJS custom binding only draws first chart but not the rest

I have been looking for a solution to this problem but could not find anywhere. Therefore I am requesting you guys here. I am trying to bind GoogleBarChart with KnockoutJS model view. All Binding events get called perfectly fine, but somehow it…
2
votes
2 answers

Custom binding(?) that adds some standard Knockout bindings to child nodes

I want to implement using Knockout something easily reusable (probably, custom binding) that could apply mix of standard bindings: the foreach binding to a tbody node and another standard bindings (visible and css) to its tr child nodes. AFAIK, the…
Alexander Abakumov
  • 13,617
  • 16
  • 88
  • 129
2
votes
2 answers

Custom knockout binding not updating underlying observable

I have a textbox bound to a custom binding. For the sake of an example all it does it wrap the control with a bordered div. I then pass the bound observable to the value binding but it is not updating the underlying observable as I'd expect. =Html= …
4imble
  • 13,979
  • 15
  • 70
  • 125
2
votes
1 answer

Knockout string format pattern

In WPF there is a binding that I use a lot; Is there a good way to achieve a similar binding in knockout? I'm using a sprintf library which would be great to…
havardhu
  • 3,576
  • 2
  • 30
  • 42
2
votes
1 answer

Update Value In textbox using Knockout + Typeahead Custom Binding

I am making an application using knockout + typeahead that will show suggestion list of entered character matches the list. All thing working fine. Only problem is when I select the item from list it stores the whole object. I want to store only…
user3145373 ツ
  • 7,858
  • 6
  • 43
  • 62
2
votes
1 answer

Skip first Update on knockout custom binding

I am creating a custom binding, named "myhandler". I need nothing in the initialize phase, and I do not want the update function to be executed the first time. The update member of ko.bindingHandlers, as said in the guide, is executed once at…
Nillus
  • 1,131
  • 1
  • 14
  • 32
2
votes
2 answers

Can you set existing Knockout bindings within a custom binding?

I currently have all my labels looking something like this: I would like to create a…
4imble
  • 13,979
  • 15
  • 70
  • 125
2
votes
1 answer

Custom Binding wraps value but fails to update

I'm using Knockout.js to wire up a dynamic form display. So instead of lovely named properties, I have an arbitrary number of "fields" in an array that I need to display and wire up. I think I'm close, but am failing in putting the finishing touches…
matty-d
  • 2,623
  • 3
  • 18
  • 21
2
votes
2 answers

Remove seconds from message timestamp to when sending signed request

I have a WCF custom binding that uses the TransportSecurityBindingElement security element, but am having continual issues with the time accuracy on both the client and the (third party) server. How can I remove the seconds to make timestamp only…
Mr Shoubs
  • 14,629
  • 17
  • 68
  • 107
2
votes
2 answers

knockout custom html binding

I am trying to use knockout to create a html editor/previewer. I set up a simple test with a single observable as follows: JS: var ViewModel = function() { this.content = ko.observable("
kiwijus
  • 1,217
  • 1
  • 20
  • 40
2
votes
1 answer

select2 with knockout change minimuminputlength dynamically

I am using Select2 control with knockout and I have a special requirement where I need to set the minimumInputLength option of the Select2 control dynamically based on the length of the options in the select2 combobox. For example if I have 100…
Krishna Veeramachaneni
  • 2,131
  • 3
  • 18
  • 24
1 2
3
10 11