three nested lists in knockout.js

160 views Asked by At

How do I create three nested list in knockout.js?

I'm using the following code but it gives an error:

Uncaught TypeError: Unable to process binding "foreach: function (){return ClauseLineModels }" Message: Unable to process binding "options: function (){return $parent.OperatorsId()[ClauseFieldsId()][ClauseInternalFieldsId()] }"

Message: Cannot read property 'undefined' of undefined

<select data-bind="options : $parent.OperatorsId()[ClauseFieldsId()]
[ClauseInternalFieldsId()],optionsText : function(item) { return $parent.DataBase()
[ClauseFieldsId()].ClauseInternalFieldses()[ClauseInternalFieldsId()].Operators()
[item].NameFa(); },value : OperatorId,optionsCaption : 'Select...'" style="width: 100%;"> </select>

I would simply create two nested lists.But I do not give three lists. How to do it?

two nested lists :

data-bind="options : $parent.ClauseInternalFieldsId()[ClauseFieldsId()],optionsText : 
function(item) { return $parent.DataBase()[ClauseFieldsId()].ClauseInternalFieldses()
[item].NameFa(); },value : ClauseInternalFieldsId,optionsCaption : 'Select ...'"

my list :

public List<int> ClauseFieldsId { get; set; } 
public List<List<int>> ClauseInternalFieldsId { get; set; } 
public List<List<List<int>>> OperatorsId { get; set; }

i use : knockoutmvc.com

0

There are 0 answers