Hi. I'm currently evaluating ejGrid as a potential replacement for our existing grid system in a business intelligence application. Our application consists of individual widgets that contain either charts or grids containing data. These widgets can be moved and resized by the user.
I currently have an ejGrid setup with about 1,000 rows of dummy data with scrolling and virtual scrolling enabled. Based on what I can see, the width/height of your grid when using the scroller is dependent on the width/height passed into the scrollSettings object at instantiation. Then the container is resized I call a function called reflow which is setup as follows:
reflow: function () {
var scrollObject;
if (this.grid) {
this.grid.option.call(this.grid, 'model.scrollSettings', {
width: this.getCalculatedWidth(),
height: this.getCalculatedHeight()
});
try {
scrollObject = this.grid.getScrollObject();
scrollObject.refresh();
} catch (e) {
console.error("Error getting grid scroll object", e);
}
}
}
The getCalculatedHeight function takes the current height of the container and subtracts the outerHeight of the .e-gridheader, e-groupdroparea, and .e-pagerstatusbar classes in the group. This works, however I'm running into two issues:
- When the grid is resized horizontally to less than 100px, scrolling causes the column header widths to be less than the content column widths. Calling the above code will fix this issue until scrolled again. See attached image for example.
- The 'option' method on the grid object is undocumented. The above fix feels hacky.
Has anyone else ran into these issues?
Attachment:
ejGrid_Issues_28b4d4e5.zip