【问题标题】:How to change delete confirmation message title kendo jQuery grid?如何更改删除确认消息标题 kendo jQuery 网格?
【发布时间】:2020-08-28 09:31:57
【问题描述】:

如何从 Kendo MVC jquery Grid Destroy Command 确认消息中删除标题?请看截图。 在我的网格命令下方。我想删除“locahost:50144 says”标题。

command: [{ className: "btn ez-icon-btn text-danger", name: "destroy", text: "" }]

谁能帮我怎么做?

仅供参考,我正在使用 Kendo jQuery Grid 开发 ASP.NET MVC。

【问题讨论】:

    标签: jquery kendo-ui kendo-grid kendo-asp.net-mvc


    【解决方案1】:

    您可以使用移动编辑确认框。 无法隐藏标题 (Kendo response)

    片段:

    var dataOne = [{
        Firstname: 'Tom',
        Lastname: 'Dillens'
      },
      {
        Firstname: 'John',
        Lastname: 'Wicked'
      },
      {
        Firstname: 'Jane',
        Lastname: 'Candy'
      }
    ];
    
    $('#one').kendoGrid({
      dataSource: dataOne,
      columns: [{
        field: 'Firstname'
      }, {
        field: 'Lastname'
      }, {
        command: 'destroy'
      }],
      mobile: "phone", // Use mobile confirmation alert
      editable: {
        confirmation: true,
        confirmDelete: "Yes"
      } // Required for mobile confirmation alert.
    });
    .k-overlay {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 10001;
      width: 100%;
      height: 100%;
      background-color: #000;
      opacity: .5;
      -webkit-backface-visibility: hidden;
    }
    
    .k-window {
      border-radius: 4px;
      border-color: #d5d5d5;
      color: #2e2e2e;
      background-color: #fff;
      box-shadow: 1px 1px 7px 1px rgba(0, 0, 0, .12);
      padding: 0;
      border-width: 1px;
      border-style: solid;
      line-height: 1.42857143;
      display: inline-block;
      position: absolute;
      z-index: 10001;
    }
    
    .k-dialog {
      padding: 10px;
      min-width: 90px;
      min-height: 3em;
      max-width: 100%;
      max-height: 100%;
      box-sizing: border-box;
      position: fixed;
      overflow: hidden;
    }
    
    .k-button {
      font-size: 14px;
      padding: 6px 12px;
      margin-bottom: 0;
      display: inline-block;
      text-decoration: none;
      text-align: center;
      white-space: nowrap;
      vertical-align: middle;
      -ms-touch-action: manipulation;
      touch-action: manipulation;
      cursor: pointer;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
      background-image: none;
      border: 1px solid transparent;
      margin: 5px;
    }
    
    .k-button:hover {
      color: #333;
      background-color: #ededed;
      text-decoration: none;
    }
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2020.2.617/js/kendo.all.min.js"></script>
    <table id='one'></table>

    【讨论】:

    • 感谢您的回答,但我需要显示确认消息但需要隐藏标题。如何隐藏标题?
    • 谢谢你 Crezzur,如果我使用这个 kendo.cdn.telerik.com/2020.2.617/styles/kendo.common.min.css" rel="stylesheet" /> css 那么警报消息将出现,没有标题意味着目的已服务但我现有的页面 css 已损坏.您能否给我确切的 css 用于我可以在此页面中使用的“使用移动确认警报”。谢谢!
    • 或者干脆如何捕捉标题部分来隐藏。谢谢
    • 不确定您现在的问题是什么,移动确认没有显示标题,还是我错了?
    • 我不想显示标题,移动确认(您的解决方案)工作正常。但我无法添加整个 css 文件,因为它破坏了我现有的页面。我只需要“移动确认”CSS。谢谢
    猜你喜欢
    • 1970-01-01
    • 2018-12-24
    • 1970-01-01
    • 2022-10-04
    • 1970-01-01
    • 2013-06-07
    • 1970-01-01
    • 2021-12-05
    • 1970-01-01
    相关资源
    最近更新 更多