【问题标题】:How I can increase the width of the filter menu in the column menu in Kendo Grid?如何在 Kendo Grid 的列菜单中增加过滤器菜单的宽度?
【发布时间】:2020-11-13 15:55:20
【问题描述】:

我知道使用filterMenuInit 的可能性。但是当我使用columnMenu 时,这个事件没有被触发。

我尝试使用columnMenuOpen 并更改.k-animation-container 内部元素的样式,但不幸的是不成功。

谁能帮帮我?

$("#grid").kendoGrid({
  columns: [{
      field: "id"
    },
    {
      field: "name"
    },
    {
      field: "phone"
    }
  ],
  dataSource: [{
      name: "Jane Doe",
      id: 1,
      phone: "88443558741"
    },
    {
      name: "John Doe",
      id: 2,
      phone: "88443558751"
    }
  ],
  filterable: true,
  columnMenu: true,
});
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2020.3.1021/styles/kendo.default-v2.min.css" />
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2020.3.1021/js/kendo.all.min.js"></script>
<div id="grid"></div>

【问题讨论】:

    标签: kendo-ui kendo-grid kendo-menu


    【解决方案1】:

    这样的?

    .k-filter-menu-container {
         width: 200px;
    }
    

    示例:filter menu width

    【讨论】:

    • 感谢您的帮助。我想要一个更灵活的解决方案。能够根据列定义宽度。但它也非常有用。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-13
    • 2014-03-28
    • 1970-01-01
    相关资源
    最近更新 更多