Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
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.

Parents
No Data
Reply
  • 10685
    Offline posted

    Hello Mike,

     

    Thank you for posting in our community!

     

    However, in order to be able to assist you better, it will be best if you can share a runnable code sample illustrating your approach. A convenient way to do so is to start with one of our available samples and modify it in jsfiddle, sharing a link with the result.
    igTree samples can be found at :
    https://www.igniteui.com/tree/overview

Children
No Data