简体   繁体   English

Kendo网格文本在列宽上的切割

[英]Kendo Grid Text Cut on Column Width

I have a Kendo Grid 我有剑道网格

http://dojo.telerik.com/IWuxI http://dojo.telerik.com/IWuxI

In my example when the detail grid is expanded, I have a column with a lot of text -> the "Text" column. 在我的示例中,当展开详细信息网格时,我有一列包含很多文本->“文本”列。

The two other columns have a fixed with, so when resizing the window those stay the same, but the "Text" column expands. 另外两列具有固定的,因此在调整窗口大小时,它们保持不变,但“文本”列会扩展。

Does anyone know if there is a way where I can always keep the Text column only show 1 line of text ie cut off the rest based on its witdh?! 有谁知道是否有一种方法可以让我始终保持“文本”列仅显示一行文本,即根据其witdh截断其余部分? Maybe through css? 也许通过CSS? Maybe there is an in-house function by Kendo but I have not found anything of the such. 也许剑道有一个内部职能部门,但我还没有发现任何类似的职能。

Here is the Documentation: http://docs.telerik.com/kendo-ui/api/javascript/ui/grid 这是文档: http : //docs.telerik.com/kendo-ui/api/javascript/ui/grid

Thanks 谢谢

I have updated your dojo with what I think you want. 我已经根据我的需求更新了您的dojo。 With style added for first line text only. 添加样式仅用于第一行文本。

all I have done is add the following attribute to the column: 我要做的就是将以下属性添加到该列:

{ style:"white-space:nowrap;" }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM