固定宽度网站中的网格列过多

发布于 2024-07-19 11:56:47 字数 121 浏览 2 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

故事还在继续 2024-07-26 11:56:47

您的选择是以下各项的组合:

  1. 较小的字体
  2. 合并一些单元格以使其具有多行(例如,如果您有“开始日期”和“结束日期”,则将开始日期放在顶部,结束日期放在底部
  3. 。窗口
  4. 使某些单元格有条件地显示(基于用户定义的过滤器),也许最常用的单元格会正常显示,并且复选框会取消隐藏不常用的单元格或单元格组
  5. 允许水平滚动
  6. 使窗口具有流畅的宽度
  7. 弹出数据 。通过 javascript 浮动
    而不是将其放入列中

我遗漏了什么吗?

Your choices are a combination of the following:

  1. Smaller fonts
  2. Consolidate some cells to have more than one row (e.g. if you have a "start date" and "end date" put the start date on top and the end date on the bottom.
  3. Widen the window
  4. Make some cells appear conditionally (based on user-defined filters). Maybe the most frequently used cells appear normally and a checkbox unhides the less frequently used cells or groups of cells.
  5. Allow horizontal scrolling
  6. Make the window a fluid width
  7. Popup data in a floating <div> via javascript instead of putting it in a column

Am I missing anything?

维持三分热 2024-07-26 11:56:47

我也在使用 Telerik 控件,在与他们进行大量工作后我学到的一件事是他们的 CSS 通常很好,但我也面临你的问题,这是我的建议。

  • 凯尔特克斯说的话。
  • 总是向你的 Rad Grid 添加一个自定义类,你可以在其中修复那些讨厌的东西。
  • 不要对网格使用固定宽度,而是在列上使用它并使网格流动,页面也是如此。

希望这可以帮助。

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.

  • what Keltex said.
  • always add a custom class to your Rad Grid where you do fix those nasty stuff.
  • don't use fixed width for Grid, instead use it on columns and make the grid Fluid, so does the page.

hope this helps.

九歌凝 2024-07-26 11:56:47

我同意 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文