jQuery UI Widgets Forums Grid jqxGrid destroy error if grid is hidden

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 9 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • celeona
    Participant

    I have a situation where I am creating a jqxGrid on a tab (bootstrap tab). The tab that contains the grid is initially hidden. When the user clicks the tab, the grid appears. This all works fine.

    But, if the user never clicks the tab, and the grid never renders, the call to $(element).jqxGrid(‘destroy’) throws an exception. Debugging it, it looks like it is when it tries to call columnsheader.remove(), because columnsheader is undefined.

    Need a couple of additional ‘if’ statements within destroy to make sure undefined variables are not used this way and avoid the exceptions.

    This is using version 3.6.0


    Peter Stoev
    Keymaster

    Hi celeona,

    Why would you destroy something which is not created? What’s the problem to render it and then “destroy” it? Why do you create a Grid, if you don’t render it?

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.