Hey Guys,
I am trying to implement a modal popup on an image button which is bound to each node on the treeGrid, everything works fine on initial load but after filtering in search bar the image click event stops working, i am not getting any error on browser console or on my viewmodal,
I am binding the treeGrid using knockout, from view modal i am creating an link and img button and binding as treegrid source.
image button binding as : <img title='Company Information' class='modal-image' src='" + common.baseContentUrl + "/images/info-apps-16x16.png' height='10px' width='10px' data-toggle='modal' data-bind='click: $root.showCustomModal.bind(this,1111)'/>
Attaching the tree as an attachment.
Any suggestions would be helpful. can not attach full code ( sorry).
Thanks
Hello,
Thank you for using Infragistics forums!
If this is indeed an igTreeGrid control and you are using the Filtering feature to filter it, the rows you see post filtering are actually newly rendered and therefore the "click" bindings have not been processed by KO with a ko.applyBindings call. You can use an event such as dataFiltered to process the new rows with additional ko.applyBindings calls.
I hope this helps! Please, let me know should have any other issues or concerns!
Best regards,
Stamen Stoychev
THank you so much for directing me Stamen, Stoychev,
However it would be really helpful if you can provide me any sample for the same,
Thanks.
I prepared a small fiddle you can find @ https://jsfiddle.net/y0jpmj36/1/ . It is not similar to your sample, as I can't reconstruct what your case is from one screenshot but it shows how to use the dataFiltered event to rebind elements with data-bind attributes dynamically. As you will see if you filter the tree grid the links will keep working and will increase the counter shown at the bottom.
I hope this helps! Please, let me know should you have any other questions or concerns!