jQuery UI Widgets Forums Grid Reporting a bug & workaround in rendering with jquery ui tabs

Tagged: 

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

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

  • Basm
    Participant

    first Thanks for the great product

    the problem:
    using jquery ui tabs, when u have grid initialized in two or more tabs then u try to switch to tab that’s not visible by default u will find grid width squeezed and not taking the specified width

    tested in: firefox 23.0.1, chrome 29

    here’s a jsfiddle that show the bug
    http://jsfiddle.net/2yup6/1/

    just go to tab 2 to see the grid not taking it’s normal width

    workaround:
    for grid with id = ‘grid’
    – call $(‘#grid’).jqxGrid(‘refresh’), when tab activate
    – or $(‘#contentgrid’).width(‘100%’) , in grid ready event

    note last solution just change width to any width u want, also this is the solution i used which i think is better that using refresh which as docs say repaint grid

    Thanks,
    Basm


    Peter Stoev
    Keymaster

    Hi Basm,

    The Grid should be initialized from a visible DIV tag. Otherwise, the size of a Hidden DIV tag is 0, 0 so the Grid will not be able to calculate and measure its elements. That is the reason we added a demo – integration.htm with our jqxTabs widget which illustrates how to use the Grid with jqxTabs. If you use other Tabs widget, you should make sure that you initialize the Grid from an element which is displayed on your page.

    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.