Telerik (rad)gridview 的奇怪行为

发布于 2024-10-03 17:00:40 字数 233 浏览 0 评论 0原文

我有一个 WPF 应用程序,其中 GridView 绑定到 IQueryable<>直接从数据库表加载的集合。 该表包含一些文本字段。问题是GridView会根据行的长度自动增加所有行 TEXT 字段的值。这意味着如果 TEXT 字段的值有 5 行某些文本,则适当的 GridView 行会增加其值 高度并显示所有 5 条线。我需要 GridView 为单行文本提供相同静态高度的所有行 (文本字段带有省略号按钮)。可以做这样的事情吗?

I have a WPF application with a GridView bound to an IQueryable<> collection wich is loaded directly from a database table.
This table holds some TEXT fields. Problem is that the GridView automatically increases all rows according to the length of
the TEXT field's value. Meanang that if the TEXT field's value has 5 lines of some text, proper GridView row increases its
height and shows all 5 lines. I need the GridView to have all rows of the same static height just for a single line of text
(with an ellipsis button for TEXT field). Is it possible to do something like that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

我一直都在从未离去 2024-10-10 17:00:40

尽量避免自动生成列并手动设置列宽。它应该防止这种行为。

如果您想更进一步,可以为单元格分配一个模板,并在模板中放入不换行的文本。

此致

Try to avoid auto-generated columns and set manually the column widths. It should prevent that behavior.

If you want to go further, you can assign a template to cells and put in the template a text that does not wrap.

Best regards

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