固定宽度网站中的网格列过多
我正在使用 Telerik 的 Radgrid 作为网站。 网格列通常会超出可用宽度,并延伸到主要内容区域(固定宽度)之外。
那么我有什么选择来呈现非常宽的网格呢? 水平滚动条在我的网站上看起来很难看
I am using Telerik's Radgrid for a website. Often the grid columns exceed the available width, and extend outside the main content area (fixed width).
So what are my options for presenting very wide grids. horizontal scroll bars just look ugly on my site
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的选择是以下各项的组合:
而不是将其放入列中
我遗漏了什么吗?
Your choices are a combination of the following:
<div>
via javascript instead of putting it in a columnAm I missing anything?
我也在使用 Telerik 控件,在与他们进行大量工作后我学到的一件事是他们的 CSS 通常很好,但我也面临你的问题,这是我的建议。
希望这可以帮助。
i am using telerik controls too, one thing i have learned after a lot of work with them is their CSS is usually good, but i also face your problem, and here is my advise.
hope this helps.
我同意 devmania 并使网格变得流畅,我最近也遇到了类似的问题。 因此,我现在将一些专栏进行了包装,并将其余的内容包装起来。 它在较小的屏幕上看起来不太好,但它仍然可用,因为我已经停止了诸如日期+时间列换行之类的操作。 然而,一旦你开始在更宽的屏幕上使用它,它看起来就很棒。
这完全取决于您有多少滚动条。 是否可以删除一些列并将该信息放在弹出/弹出窗口中?
另一种选择是让用户可配置显示哪些列,但您并没有真正解决问题,只是让用户有责任使其看起来更漂亮。
如果您无法摆脱水平滚动条,您至少应该尝试将更重要的列放在前面,这样您的用户就不必经常向右滚动。
I agree with devmania and making the grid fluid, I had a similar problem recently. So I made a few of my columns nowrap and left the rest to wrap. It doesn't look great on smaller screens but it's still usable because I've stopped things like date+time columns wrapping. However, once you start using it on a wider screen it looks great.
It all depends on how much of a scrollbar you have. Is it possible to strip out some of the columns and have that information in a popup/flyout somewhere?
Another option is to make which columns are shown user configurable, but you're not really addressing the problem, just making it the responsibility of the user to make it look nice.
If you can't get rid of the horizontal scrollbar you should at least try to put the more important columns first so that your users don't have to scroll to the right very often.