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
3790
getting px heights of header.
posted

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.


           

Parents
No Data
Reply
  • 3995
    Verified Answer
    Offline posted

    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.

Children