jQWidgets Forums

jQuery UI Widgets Forums Grid Grid 'IsHidden' method

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Grid 'IsHidden' method #63584

    herrdavies
    Participant

    Hi there!

    I have been using the grid extensively within an application. Using an iFrame, I dynamically load content into the application and use Knockout.js to bind everything within the iFrame. Everything works fine apart from the grid. In certain iFrames I use 3 grids (within a jqxTabs tab), which all get bound dynamically on the click of their respective tab.

    However, I have noticed that when these have all loaded, I am seeing constant CPU utilisation by the application, of usually around 8-10%.

    Now, I traced the utilisation to a specific method which is used by the jqxGrid, the ‘IsHidden’ method.

    I am wondering if there is a way to stop this, or possibly turn off the ‘IsHidden’ check.

    Thanks in advance!
    Alex

    Grid 'IsHidden' method #63585

    Peter Stoev
    Keymaster

    Hi Alex,

    No, you can’t stop this check and the Grid does it only when you “resize” the browser’s window and the Grid’s size is in percentages. The performance of this method also depends only on the web browser’s offsetWidth and offsetHeight property getters. However, I would suggest you to create your Grids in Tabs within the tab’s initTabContent function as shown in the Integration demo of jqxTabs.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid 'IsHidden' method #63587

    herrdavies
    Participant

    Hi Peter, thanks for your speedy reply!

    Ok, I thought it would be something like that. Is there any reason that this method would be executing when the window is not being resized? The CPU utilisation is there when the browser has no interaction and is idling…

    Also, I am not using percentages with the grid, I am using a fixed pixel width. Any suggestions?

    I will look in to the grid initialisation from the initTabContent, much appreciated there!

    Many thanks,
    Alex

    Grid 'IsHidden' method #63588

    Peter Stoev
    Keymaster

    Hi Alex,

    I supposed that you created the Grid from hidden DIV tag and that’s the reason the method is called – to check when to display and render your Grid on demand. However, this should not take much time. I repeat, we use offsetWidth and offsetHeight to check whether an HTML Element is visible on the Web Page.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.