Extra Column in SlickGrid

2019-06-27 09:09发布

SlickGrid always maintains a little space in right most side of the header, even there is no vertical scroll bar. This extra space seems like a extra column. I don't want this extra space.

I don't find any exposed API of SlickGrid component to remove this.I have seen inside autosizeColumns() method of SlickGrid implementation that available width is calculated by the availWidth = (options.autoHeight ? viewportW : viewportW - scrollbarDimensions.width) logic. When I avoid scrollbarDimensions.width from the logic no extra space is coming there.

But this cause a problem for forceFitColumns functionality when vertical scroll bar is present there, an unnecessary horizontal scroll bar is also rendered.

Is there any way to avoid this extra space?

Hi Tin,

I want to remove extra space of SlickGrid what I described before. I have checked there is no API or property in SlickGrid to do this. That's why I had modified SlickGrid implementation.

标签: slickgrid
1条回答
Melony?
2楼-- · 2019-06-27 10:01

I use v2.1 and when I set:

options = {
    forceFitColumns: true
};
slickgrid.setOptions(options);

There is no extra column when vertical scrolling is not needed.

查看更多
登录 后发表回答