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.
Hello Divya,
I initialize the grid in the controller and I set DefaultColumnWidth = "*" to get the best result. I additionally set one column to a special width because otherwise it gets too big.
What I want is the grid always to show maximum size, so when the user resizes the window the grid should increase or decrease in size. This is working perfectly with the code I sent you, but only for for not hierarchical grid and for the top level part of hierarchical grid. Now I need the same for the child rows and headers.
The application is actually not planned for using on mobile devices, but I will take a look into the responsive feature. Thank you for providing this information.
Kind regards,
Hello Petra,
To understand the requirement I would like to have some more information including:
How did you set up your grid?
Did you set up the width of the individual column of the grid also?
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.