Replies
I encountered the same issue in the same situation : iggrid is in a fixed table with width and height set to 100%, resulting in the fixed header not resizing properly.
Another bug was not notified in the previous posts : the width of the fixed header will be incorrect if there is a vertical scroll bar (it doesn't take into account the width of the scroll bar and will take 100% width (instead of 100% width – vscroll.width), resulting in an offset of the columns of the header and the body)
Here my code to workaround this until there is a proper fix by Infragistics.
- version 2013.2
- browsers : IE 8-9-10-11, Chrome 33
Also, how can i know when this bug is fixed by your dev team ?
Workaround code :
function igGridWorkaroundResize(iggrid) { //Initialize
iggrid.igGrid({
rendered: function (evt, ui) {
setTimeout(function() { // setTimeout needed for IE8, other browsers are fine
resizeIgGridBody();
resizeIgGridHeader();
}, 100);
}
});
/* Force igGrid resizing when windows resize */
$(window).resize(function () {
resizeIgGridBody();
resizeIgGridHeader();
});
function resizeIgGridBody() {
// resize whole body to 100%
iggrid.css("width", "100%");
// hide horizontal scroller because it shouldn't appear
$("#grid_hscroller_container").css("height", 0);
}
function resizeIgGridHeader() {
// resize whole header to body width (because 100% doesn't take 'vertical scroll bar width' into account)
var width = iggrid.width();
iggrid.parent().parent().find(".ui-iggrid-headertable").css("width", width);
}
}