简体   繁体   English

在客户端动态更改Telerik MVC网格列

[英]Changing the Telerik MVC Grid columns dynamically on client-side

I would like to show my table data in grid. 我想在表格中显示我的表格数据。 The table has more than 50 columns. 该表有超过50列。 By default they are displayed fine but I need a way to hide/show columns which are not required on screen. 默认情况下,它们显示良好,但是我需要一种隐藏/显示屏幕上不需要的列的方法。

So is there any way to achieve this? 那么有什么办法可以做到这一点? I think right clicking on the header should show all headers in a list box, allowing selection of which columns we want, then refresh the grid. 我认为右键单击标题应该在列表框中显示所有标题,允许选择我们想要的列,然后刷新网格。

Please let me know if Telerik supports this and, if so, how? 请让我知道Telerik是否支持此功能,如果支持,如何?

No builtin feature available and this is one of many reasons why we are still thinking about other grids instead of telerik. 没有可用的内置功能,这是我们仍在考虑其他网格而不是telerik的众多原因之一。

In the demo site there is a page where they show all the column names with checkboxes on top of the grid and you can check/uncheck to show/hide columns. 在演示站点中,有一个页面,其中显示所有列名称,并在网格顶部显示复选框,您可以选中/取消选中以显示/隐藏列。 see that sample source code, is simple to implement but still is custom code to add manually. 看到示例源代码,易于实现,但仍然是手动添加的自定义代码。 I love the devexpress grid with customization popup and columns dragdrop from there but nothing like that for us in Telerik :-( 我喜欢devexpress网格,它带有自定义弹出窗口和从那里拖动的列,但是Telerik中没有这样的东西:-(

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

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