20
igTree html in textKey in bindings
posted

I am attempting to use the igTree with a custom look for the textKey binding. I have set the binding name to the corresponding property in my JSON object. The property is filled with html that I would like to display. Here is a sample of the data in the textKey property:

$"<div class='row entity'><div class='row'><div class='col-sm-1'><br /></div><div class='col-sm-1'></div><div class='col-sm-10 child-bold'>{o.Name}</div></div><div class='row'><div class='col-sm-2'><br /></div><div class='col-sm-2 child-normal'>{o.Id}</div><div class='col-sm-4 child-normal'>{o.City}, {o.State}</div><div class='col-sm-1 {o.Code}'></div><div class='col-sm-3'></div></div></div>"

The html does render in the igTree control but I am seeing errors in the browser console window. The error I am seeing is: 

infragistics.lob.js:123 Uncaught Error: Runtime changes are not allowed for the following option: bindings
at e.(anonymous function).(anonymous function)._setOption (http://cdn-na.infragistics.com/igniteui/2017.1/latest/js/infragistics.lob.js:123:7582)
at e.(anonymous function).(anonymous function)._setOption (http://localhost:8088/JavaScript/Shared/jquery-ui.min.js:6:7983)
at e.(anonymous function).(anonymous function)._setOptions (http://localhost:8088/JavaScript/Shared/jquery-ui.min.js:6:11194)
at e.(anonymous function).(anonymous function).option (http://localhost:8088/JavaScript/Shared/jquery-ui.min.js:6:11127)
at HTMLDivElement.<anonymous> (http://localhost:8088/JavaScript/Shared/jquery-ui.min.js:6:9278)
at Function.each (http://localhost:8088/Scripts/jquery-2.2.3.js:365:19)
at jQuery.fn.init.each (http://localhost:8088/Scripts/jquery-2.2.3.js:137:17)
at jQuery.fn.init.e.fn.(anonymous function) [as igTree] (http://localhost:8088/JavaScript/Shared/jquery-ui.min.js:6:9236)
at HTMLDocument.<anonymous> (http://localhost:8088/JavaScript/Views/Relationship/Relationship.js:25:19)
at fire (http://localhost:8088/Scripts/jquery-2.2.3.js:3187:31)

I am looking to find out what is causing this error and how to fix it.