Changing the kendo numeric filter format

后端 未结 8 1628
孤街浪徒
孤街浪徒 2021-02-09 12:16

I am applying custom paging and sorting in the kendo grid. For one of my column I am getting a numeric text box. When I insert the value in numeric text box it is integer, but a

8条回答
  •  深忆病人
    2021-02-09 13:02

    You can set format on the filterable on the column like this:

                field: "TaskId",
                title: "TaskId",
                width: 80,
                filterable: {
                    ui: function (element) {
                        element.kendoNumericTextBox({
                            format: "n0"
                        });
                    }
                }
    

    Update This is the javascript version. here my complete grid defintion:

          $("#uxRunningTasksGrid").kendoGrid({
            dataSource: runningTasksDataSource,
            height: $(document).height() - 280,
            autoBind: true,
            filterable: true,
            sortable: true,
            pageable: false,
            reorderable: true,
            resizable: true,
            columns: [{
                command: { text: "Details", click: openDetails }, title: " ", width: 80
            },
                {
                    field: "TaskId",
                    title: "TaskId",
                    width: 80,
                    filterable: {
                        ui: function (element) {
                            element.kendoNumericTextBox({
                                format: "n0"
                            });
                        }
                    }
                }
            ]
         };
    

提交回复
热议问题