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
copying the ui-widget style.
posted

I have a grid using the ui-widget (infragistics.theme.css: 12) style and I'm copying it using html like this.

 var linkrels = document.getElementsByTagName( 'link' );

for ( var i = 0, max = linkrels.length; i < max; i++ )
            {
                //copy in styles.
                if ( linkrels[i].rel && linkrels[i].rel == 'stylesheet' )
                {
                    
                    var thestyle = document.createElement( 'link' );
                    var attrib = linkrels[i].attributes;
                    for ( var j = 0, attribmax = attrib.length; j < attribmax; j++ )
                    {
                        s = s + " " + attrib[j].nodeName + ":" + attrib[j].value + "  \n"
                        thestyle.setAttribute( attrib[j].nodeName, attrib[j].value );
                    }
                    newWindow.document.documentElement.appendChild( thestyle );

                    
                }
            }

Looks like all of my styles copy over but the ui-widget. Seems its not found using the document.getElementsByTagName( 'link' )

This is all I have for example code, any reason that would not copy over?

Parents
  • 9190
    Offline posted

    Hi Sean,

    In the attached sample, I do see the listOfStyles array I created does indeed contain the 7 stylesheets copied from the original rendered markup on the page. Can you provide me with additional information on the issue you are encountering? You mentioned that the ui-widget style isn't being copied over, but I don't see a "ui-widget" stylesheet included in our product.

    I am looking forward to hearing from you.

    igGridStyle .zip
Reply Children