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
2745
igGridColumnFixing non-fixed column width
posted

I have a grid with 23 columns.  The first 6 columns are fixed while the rest are non-fixed.  The fixed columns are being set with "26.01%" width which is hiding some of my fixed columns.  Using debugging tools, I see that there is a DIV with the id of "Grid_mainFixedContainer" that contains the hardcoded inline style.  I tried to get a handle to that DIV in jQuery on the rendered event but I can't get it for some reason.

I want to get rid of that width declaration.  It is messing up the display because a horizontal scrollbar does not exist for the fixed columns.

In the attached image, the area in blue is the table header being selected using IE tools and it outlines the correct/preferred width that it should be.  If I remove the width declaration then it renders perfectly.

Thanks,

Parents
No Data
Reply
  • 2745
    Verified Answer
    Offline posted

    I make the change directly after initializing the grid instead of waiting a specific event.  I call this function that loops itself to check for the element:

    function handleGridWidth() {
        var container = $("#Grid_mainFixedContainer");

        if (container.length === 0) {
            setTimeout(handleGridWidth, 450);

            return;
        }

        container.css("width", "");
    });

Children
No Data