or
$(document).ready(function () {
$("#grid").kendoGrid({
dataType: "json",
dataSource: {
transport: {
read: "cfcs/queries.cfm",
destroy: {
url: "/cfcs/destroy.cfm"
}
},
schema: {
data: "data",
model: {
fields: {
BADGEID: {
type: "number"
},
EMPLOYEENAME: {
type: "string"
},
UNITID: {
type: "number"
},
UNITNAME: {
type: "string"
}
}
}
}
},
editable: {
destroy: true,
update: false
},
height: 450,
filterable: true,
groupable: true,
sortable: true,
pageable: false,
columns: [{
field: "BADGEID",
title: " ",
width: 35,
template: "<
input
type
=
'checkbox'
/>"
},{
field: "BADGEID",
title: "Badge Id"
}, {
field: "EMPLOYEENAME",
title: "Employee Name"
}, {
field: "UNITID",
title: "Unit Id"
}, {
field: "UNITNAME",
title: "Unit Name"
}, {
command: "destroy",
title: " ",
width: 110 }
]
});
});
Dear support team,
I use the Kendo UI grid inside a Bootstrap Responsive Layout.So if displayed on smartphones, I would need the following behavior:
Among all columns there should be a particular one, that keeps its optimal width whereas the others should be shrinked down to zero.How can I get this?
As far as I have seen, optimal column widths are available if Grid.Scrollable is set to false.On the other hand, if Scrollable == true and I do not set the width of a certain column, it will fill the gap that is left over from the other columns' common width. Is there a public(?) Kendo function that calculates the optimal column width for a given set of data,that I can call in the dataBound eventhandler?
Best regards,