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
960
IgGrid column sizing breaks when within jQueryUI tabs
posted

Hello,

I found that IgGrid does not correctly create column size when the grid is contained within a JQueryUI tab element. I started with your igGrid example and created a JSFiddle to show the problem. For some reason it works on the first tab, but not on the second.

In my application/test code, it fails on the first tab as well.

http://jsfiddle.net/9xp7uw7m/

I believe this is related to this post :

http://es.infragistics.com/community/forums/p/91235/450789.aspx#450789

I created a support ticket, but thought this should be here for other developers to find.

Thank you.

Parents
  • 17590
    Offline posted

    Hello C J,

    Thank you for posting in the community.

    As stated in the mentioned forum post the grid is initialized before the tab and its width is being limited. What I can suggest as a workaround is handle the activarte event of the tab, to ensure it is being successfully activated. Since this event is fired when the tab is activated, in your scenario when you switch to the second tab, it could be used to set the width of the header and content table to match the grid from the first tab. For example:

    $("#tabs").on("tabsactivate", function (event, ui) {

    var $igGridTables = $('.ui-iggrid-table.ui-widget-content');

    var $igGridHeaderTables = $(".ui-iggrid-headertable");

    var width = $igGridTables.first().width();

    $igGridTables.width(width);

    $igGridHeaderTables.width(width);

    });

    Your modified sample could be found at:

    http://jsfiddle.net/9xp7uw7m/1/

    I hope this helps you achieve your requirement,

    Please let me know if you need any further assistance with this matter.

Reply Children