ko.observablearray Questions

2

Solved

I am trying to add elements from the server to observable array in knockout. Here is my ViewModel: function ArticlesViewModel() { var self = this; this.listOfReports = ko.observableArray([]); ...
Mihalco asked 21/2, 2014 at 9:56

3

Solved

Im currently using KnockOut JS and i conducted some research about when the observable is notified it will fire a function which is like this function FunctionToSubscribe() { } var TestObservab...
Frederick asked 27/11, 2014 at 6:33

5

Solved

I would like to know how to create a computed observable array. In my view model, I have 2 observable arrays, and I would like to have a computed observable array that is simply both arrays combi...
Mycosis asked 2/7, 2012 at 18:3

5

Solved

When calling the length of any observable in the customerOverview view model I receive a length of zero. There is data present in the observables as the bindings update with data, however the lengt...
Phoenician asked 21/3, 2013 at 18:47

3

Solved

I'm trying to replace all of the contents of an item in an observableArray with new content. var oldLocation = ko.utils.arrayFirst(self.locations(), function (item) { return item.id == value.id; ...
Fablan asked 15/3, 2013 at 19:39

2

Solved

What is the proper way to initialize a Knockout observableArray in a TypeScript class? I am doing something like this: module ViewModel { declare var ko; export class IndexPageViewModel { ...
Impurity asked 31/10, 2012 at 21:57

2

Solved

how do i insert element in knockout array at specific index I understand we have to use slice and push, but what is the best way and how to insert new element at specific position in observable ar...
Satirist asked 16/4, 2014 at 19:40

1

Solved

So I've got an observablearray that works fine, but the UI doesn't update. I've read lots of people running into this TYPE of issue, but I'm not seeing it. So the HTML is <tbody data-bind="f...
Vedda asked 15/2, 2014 at 21:41

3

I have a html table and the rows come form an observable array.... <tbody data-bind="foreach: TableArray"> <tr> <td data-bind:"text: Item1"></td> etc.... How can I sk...
Eraeradiate asked 29/1, 2014 at 18:20

2

I have a Knockout observable array that refuses to update the UI (a jquery Accordion) to which it is bound after a .sort() call, but happily updates the UI after a .reverse() call - I've been bangi...
Ellita asked 11/11, 2013 at 13:44

2

Solved

I have the following code: // First we define our gift class, which has 2 properties: // a Title and a Price. // We use knockout js validation to ensure that the values input are suitable/ functi...
Smalto asked 28/10, 2013 at 16:28

3

Solved

For some reason i'm having trouble passing an object to observable array. function CalendarViewModel() { var self = this; self.event = { name : ko.observable(""), adress : ko.observable(""), s...
Notability asked 27/4, 2013 at 20:4

2

Solved

I have an observableArray in my view model. After creating the vm I wish to completely replace the data the observableArray. Here's how I'm doing it: //Initial Setup var vm = {}; vm.roles = ko.obs...

1

Solved

I am having trouble combining the foreach binding with a sort. I have a list bound like so: <article data-bind="foreach: widgets"> Widgets is a simple obvservable array: var widgets= ko....
Tesler asked 3/6, 2013 at 2:17

3

Solved

I would like to display an editable list of items, each item of which is editable (kind of like an editable grid, in a way). I am using KnockoutJS. I cannot use just a simple Observable Array becau...
Leyte asked 6/4, 2012 at 19:53

1

Solved

I'm trying to extract unique properties from a knockout.js observableArray of objects, to populate a drop menu. Being new to knockout, I'm really struggling with this! I want to iterate over a con...
Medford asked 13/11, 2012 at 10:58

1

Solved

In my viewmodel, I have a knockoutjs ObserableArray. Just after I initialized the ViewModel, it binds the data successfully. Then, what I need to do is to sort the collection. $.each(vm.searchResu...
Blessed asked 7/5, 2012 at 10:1
1

© 2022 - 2024 — McMap. All rights reserved.