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
280
resize hierarchical grid to window size - how to resize children
posted

Hello Infragistics team,

I have a hierarchical grid and I want it to resize to full window size when the user is resizing the window. I got this to work except the children's column widths.

I use the following code:

$(window).resize(function () {
    resizeGrid();
});

function resizeGrid() {
    $("#grid1").igGrid("option", "height", window.innerHeight-250);
    $("#grid1").igGridResizing("resize", 0);

    // resize whole body to 100%
    $("#grid1").css("width", "100%");

    // resize whole header to body width (because 100% doesn't take 'vertical scroll bar width' into account)
    var width = $("#grid1").width();
    $("#grid1").parent().parent().find(".ui-iggrid-headertable").css("width", width);      
}

Can you please tell me how to resize the child tables.

Thank you in advance,

Petra.

Parents
  • 7595
    Offline posted

    Hello Petra,

    To understand the requirement I would like to have some more information including:

    1. How did you set up your grid?

    2. Did you set up the width of the individual column of the grid also?

    3. Are you resizing the window for different devices?

    If you are resizing the window for different devices I would recommend you to use ‘Responsive Web Design’ mode feature of the iggrid.

    RWD adopts the concepts of Responsive Web Design in order to improve user experience on different devices.  Responsive Web Design mode allows you to support multiple screen sizes.

    Please refer the below sample for RWD:

    http://jsfiddle.net/t2zevc62/

    Let me know if you need further assistance.

Reply Children