My users have decided they want to see an icon/graphic in the column header of one of the columns on one of our iggrids. Using the headerText definition below, the icon shows in the column header on the original load of the application when the grid is set up the first time, but anytime the data is reloaded from the SQL back-end the icon disappears. Is this a feature that is just not supported, or am I going about it wrong? Thanks!
{ headerText: '<span class="glyphicon glyphicon-paperclip"></span>', key: "tmpBuildAttachIcon", dataType: "string", width: "25x" },
Hello Becky,
Thank you for posting in our community.
Please keep in mind that by design igGrid does not support header templates out of the box.
I tried reproducing your scenario on my side using div element instead of the span(which is inline element) and everything was working as expected. The image in the header was still present after I changed the grid`s data source and called dataBind method afterwards.
I am attaching a small sample illustrating my suggestion for your reference. Please test my suggestion on your side and let mw know what is the result. Uf thisis not an accurate demonstration of what you are trying to achieve please feel free to modify my sample in order to reproduce the issue and send it back to me along with steps to reproduce.
I hope you will find my information helpful.
Please let me know if you need any further assistance with this matter.
can we do this via css style.Img_HighRisk { background-image: url("../../Images/Grid_Icons/HighRiskOn.gif"); background-repeat: no-repeat; background-position: center;}
Thanks for the response!
Using a <div> instead of a <span> tag did not resolve the problem for me- I was still witnessing the same behavior as I was before.
At this point, the users have decided they don't want this after all, so we don't need to pursue further at this point regardless. Thank you!