Extra Column in SlickGrid

て烟熏妆下的殇ゞ 提交于 2019-12-10 17:37:54

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/11115409/extra-column-in-slickgrid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!