【问题标题】:Kendo grid pagination into custom wrapper剑道网格分页到自定义包装器中
【发布时间】:2017-01-23 09:16:25
【问题描述】:

这是我的剑道网格,我需要将分页按钮包装到我的自定义包装器中,命名为

var grid = $("#taskTableKendo").kendoGrid({
        dataSource: tasksData,
        sortable: true,
        scrollable: false,
        autoBind: false,
        pageable: {
            refresh: true,
            pageSizes: [20, 50, 100]
        },
        dataBound: tasksDataBound,
        columns: [
            { field: "Responsibility_Code", title: " ", width: 30, encoded: false, template: '<span class="responsibility type#=Responsibility_Code#" title="#=Responsibility_Description#"></span>' },
            { field: "TaskRef", title: "Task Ref", encoded: false },
            { field: "Owner_FullName", title: "Owner", width: 80, template: "<span class='usercell'>#=Owner_FullName#</span>" },
            { field: "Property_PropertyRef", title: "Property Ref" },
            { field: "Property_Name", title: "Property Name" },
            { field: "Property_City", title: "City" },
            { field: "Property_Country_Name", title: "Country" },
            { field: "JobType_Name", title: "Job Type",width:700 },
            { field: "TaskStatus", title: "Status" },
            { field: "DueDate", title: "Due" },
            { field: "DateLogged", title: "DateLogged", hidden: true },
            { field: "Comments", hidden: true },
            { field: "Documents", hidden: true },
            {
                command: [{ text: "Click here to add a comment to this task", className: "addComment", click: addCommentCommand, template: '<div class="dropdown pull-right"><button class="btn btn-link dropdown-toggle text-green-lime" type="button" id="linkDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> Actions <span class="caret"></span></button> <ul class="dropdown-menu" aria-labelledby="linkDropdown"><li> <a href="" class="k-button k-button-icontext addComment k-grid-Clickheretoaddacommenttothistask" title="Click here to add a comment to this task"><span class="CommentsNumbers"></span></a></li>' },
                    { text: "Click here to add a document to this task", className: "addFile", click: documentCommand, template: '<li><a href="" class="k-button k-button-icontext addFile k-grid-Clickheretoaddadocumenttothistask" title="Click here to add a document to this task"><span class="DocumentsNumbers"></span></a> </li>' },
                    { text: "Click here to reallocate this task to a different person", className: "reallocate", data: { field: "Id" }, click: reallocateCommand },
                    { text: "Click here to close this task", className: "closeTask", click: completeTaskCommand },
                    { text: "Click here to view and edit this task", className: "viewTask", click: editTaskCommand, template: ' </ul>  </div>'}
                ],
                title: " ",
                width: 185 

            }
        ]
    });

我只需要更改,剑道的转到上一页,转到下一页按钮到我在 html 中创建的自定义按钮。

【问题讨论】:

    标签: javascript jquery css kendo-ui pagination


    【解决方案1】:

    我找到了解决方案,只是为了改变你可以使用的上一个/下一个按钮

      pageable: {
            previousNext: true,
            messages: {
                display: "{0}-{1} of {2} total tasks",
                select: "test",
                empty: "No tasks to display",
                first: "&laquo;",
                last: "&raquo;",
                next: "&rsaquo;",
                previous: "&lsaquo;"
            },
    

    我已经搜索了所有堆栈溢出,但没有找到正确的答案。

    【讨论】:

      【解决方案2】:

      可以在 Grid 的 dataBound 事件中修改 setTimeout 块内的 Grid pager 的 HTML 呈现(不需要超时值)。

      【讨论】:

      • 你能给出更详细的答案吗?我听不懂你说什么
      猜你喜欢
      • 1970-01-01
      • 2023-03-19
      • 1970-01-01
      • 2014-10-21
      • 2014-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多