我使用ajax dataSource生成一個KendoUI網格。表格生成並且默認沒有類。爲了讓它與網站的其他部分保持一致,我想爲它添加一個「交互式」類。KendoUI網格 - 如何添加一個類到生成的表格
$("#pending_documents").kendoGrid({
dataSource: {
transport: {
read: "/get-data?type=1"
},
schema: {
data: "data",
total: "total"
},
pageSize: 2,
serverPaging: true,
serverFiltering: true,
serverSorting: true,
reorderable: true
},
height: 500,
filterable: {
extra: false
/*
, ui: "datetimepicker" // use Kendo UI DateTimePicker
*/
},
sortable: true,
pageable: {
pageSize: 2 },
columns: [...]
});
});
我知道我可以使用JQuery.addClass()
方法,生成網格後運行做到這一點,但是如果在網格中設置/配置設置它的方法嗎?
在此先感謝。
呀,可惜類需要直接應用到表,所以我唯一的選擇就是把它表後再添加,如我在規定的方式產生題。感謝您花時間參與調查! –