简体   繁体   English

jQuery - Kendo UI网格 - 大量列

[英]jQuery - Kendo UI Grid - Large Number of Columns

I have a Kendo UI grid that has a large number of columns (50). 我有一个具有大量列(50)的Kendo UI网格。 Although the user will likely only select a few columns to view, he/she needs the ability to select from any of the 50 columns. 虽然用户可能只选择几列来查看,但他/她需要能够从50列中的任何一列中进行选择。 Unfortunately, on most displays, the kendo grid column menu will be greater than the display. 不幸的是,在大多数显示器上,kendo网格列菜单将大于显示。 Is there a way to make the column menu scrollable or set sub-menus (that contain groups of columns) within the column menu? 有没有办法让列菜单可滚动或在列菜单中设置子菜单(包含列组)?

Also, I found that the initial creation of the kendo Grid component is slow to build 50 columns with column menus. 此外,我发现使用列菜单构建50列时,kendo Grid组件的初始创建速度很慢。 This is even true when initially hiding all the columns. 最初隐藏所有列时甚至都是如此。 Please let me know if also have a way to help with performance if the view issue above can be resolved. 如果可以解决上述查看问题,请告诉我是否还有办法帮助提高性能。 Many thanks in advance. 提前谢谢了。

You can use CSS to reduce the height of the column menu and add a scrollbar: 您可以使用CSS来减少列菜单的高度并添加滚动条:

.k-group .k-group
{
  height: 100px;
  overflow: auto;
}

Here is a demo: http://jsbin.com/ebenay/1/edit 这是一个演示: http//jsbin.com/ebenay/1/edit

The API allow you to Lock one or more columns with .Locked(true) on your column definition. API允许您使用列定义中的.Locked(true)锁定一个或多个列。 Also, set the horizontal scroll and the capacity to turn on and off columns client side. 此外,设置水平滚动和容量以打开和关闭客户端列。 Check this example of all this https://demos.telerik.com/aspnet-mvc/grid/frozen-columns 查看所有这些https://demos.telerik.com/aspnet-mvc/grid/frozen-columns的示例

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

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