Kendo Grid列菜单选项排序,如何?

发布于 2025-02-09 09:42:02 字数 639 浏览 4 评论 0 原文

我正在寻找一种订购列菜单选项的方法(我可以隐藏/显示的列)在字母内含义,如果我在网格中有4列,则是这样的:


| id |名称|姓|受让人|

我想要显示“列”时显示的菜单,单击以按字母顺序显示,而不是按照网格列顺序显示,应在订购时这样显示:

[x]受让人

[x] id
[x]姓
[x]名字

不确定我对我正在尝试的内容是否足够清楚...我能够使用AngularJS Kendo UI网格来完成此操作,但是使用Angular 2+ Kendo Grid,我不确定如何做它。

笔记: 在JQuery VR中。和AngularJS版本Kendo Grid采用配置对象,并且有一个称为ColumnMenuinit的事件,我可以在不影响网格中的列的实际顺序上修复菜单的顺序访问该事件。

感谢我从社区中获得的任何帮助:)

I'm looking for a way to order the columns menu options (Columns that I can hide/show) alphabetically meaning If I have 4 columns in the Grid like this:


| ID | Name | Last Name | Assignee |

I'd like the menu that shows when "Columns" it's clicked to show ordered alphabetically instead of following the grid column order, should show like this when ordered:

[x] Assignee
[x] ID
[x] Last Name
[x] Name

Not sure if my explanation of what I'm trying it's clear enough... I was able to do this with AngularJS Kendo UI Grid but with Angular 2+ Kendo Grid I'm not sure how to do it.

NOTE:
In the Jquery Vr. and AngularJS Version the Kendo Grid takes a configuration object and there's an event called columnMenuInit where I can fix the order of the menu without affecting the actual order of the columns in the grid, but with Angular2+ I'm not sure if I have a way to access that event.

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/events/columnmenuinit

Appreciate any help I can get from the community :)

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

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

发布评论

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

评论(1

捂风挽笑 2025-02-16 09:42:02

设置columnmenu.columns.sort配置(文档):

columnMenu: {
  columns: {
    sort: 'asc'
  }
}

小提琴: https://dojo.telerik.com/upanadut

Set the columnMenu.columns.sort configuration (documentation):

columnMenu: {
  columns: {
    sort: 'asc'
  }
}

Fiddle: https://dojo.telerik.com/upanADuT

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