I use this to get the hieghts
var headerSize = this.gridIDMap.option( "columns" )[c].headerText.visualLengthWidth()
//fyi String.prototype.visualLengthWidth = function () { var ruler = document.getElementById( "ruler" ); ruler.innerHTML = this; return ruler.offsetWidth; }
but this method has issues, so I was hopping for a better way.
Hello seang,
Thank you for posting in the community. It is possible to get the exact width or height of the text in the header of the grid, if you use the span with class ui-iggrid-headertext in the header cells. For example
$("#gridId_container thead th span.ui-iggrid-headertext")[index].offsetHeight
or
$("#gridId_container thead th span.ui-iggrid-headertext")[index].offsetWidth
Please let me know if this helps.
Sincerely,
Deyan Kamburov
Infragistics, Inc.
please don't hesitate to contact me on any matter regarding this case.