删除 GXT 网格中行之间的空格/线
我的目标是在网格的某些列之间创建一条实线。为了实现这一点,我对相应的列执行了以下操作:
ColumnConfig colConfig = new ColumnConfig("myID", "My Col Title", 50);
colConfig.setStyle("border-right:solid medium black;");
正如您从附图中看到的,行之间似乎有空格,这阻止了我的列边框成为向下的实线。任何人都可以帮助消除行之间的这些线,或者使用其他方法来实现我的目标吗?
我看到网格类型本身提供了一种方法来打开/关闭列线:
grid.setColumnLines(false);
但我没有看到任何行。我也不知道即使对于列,该方法是否隐藏了行或实际上删除了它们 - 我怀疑是前者。
预先感谢您的所有答复。
My goal is to create a solid line between certain columns of a Grid. To accomplish this, I've done the following to the appropriate column:
ColumnConfig colConfig = new ColumnConfig("myID", "My Col Title", 50);
colConfig.setStyle("border-right:solid medium black;");
As you can see from the attached picture, the rows seem to have spaces between them that is preventing my column border from being a solid line going down. Can anyone help with either eliminating these lines between rows, or some alternative to accomplish my goal?
I see there is a method provided on the Grid type itself to turn on/off column lines:
grid.setColumnLines(false);
But I don't see anything for rows. I also don't know whether even for columns that method is hiding the lines or actually removing them - I suspect the former.
Thanks in advance for any and all answers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗨,我通过使用一些字符串操作来完成此操作,方法如下;
创建自己一个 GridView (扩展网格视图)并覆盖以下内容
}
这将在渲染时去除网格中的任何边框
希望它有所帮助
Hi I did this by using a little string manipulation heres how;
Create yourself a GridView (extending Grid View) and override the following
}
this will strip out any borders in grid as its rendered
hope it helps
边框是为类
.x-grid3-row
定义的(应用于行的 div 元素),因此您可以在自定义 .css 文件中覆盖它或删除相应的行来自您的 gxt-all.css (我推荐第一种方法,因为 gxt-all.css 可能会随着未来的 gxt 版本而改变,覆盖您的更改)the border is defined for the class
.x-grid3-row
(applied on the div-element for the row), so you can just override this in a custom .css-file or delete the corresponding line from your gxt-all.css (i'd recommend the first method, because the gxt-all.css could change with future gxt versions, overwriting your changes)