igTree html in textKey in bindings

Not Answered This post has 0 verified answers | 1 Reply | 2 Followers Thread's RSS feed.

Mike
Points 20
Replied On: Thu, Oct 12 2017 4:46 PM Reply

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.

  • Post Points: 20

All Replies

[Infragistics] Ivaylo
Points 10,535
Infragistics Employee
Replied On: Fri, Oct 13 2017 2:14 AM Reply

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

Sincerely,
Ivaylo Ganchev
Software Developer
Infragistics, Inc.
http://www.infragistics.com/support

  • Post Points: 5
Page 1 of 1 (2 items) | RSS