(Before getting into the article, I apologize for my poor English skills.)
Hello! you guys always help me.
I need to create checkboxes using kendoCheckBoxGroup function in specific fields of KendoForm.
However, it should be limited to 4 per line, not listed in one line.
Expressing it pictorially is as follows:
(Note, the text that goes into the field will vary in length.)
And, the code I'm working on is below.
var items = [
{value: "item1", label: "Item 1"},
{value: "item2", label: "Item 2"},
{value: "item3", label: "Item 3"},
...
{value: "item14", label: "Item 14"},
];
$('#checkBoxField').kendoCheckBoxGroup({
items: items,
layout: "horizontal"
});
How can I modify it to make it work the way I want?
Thank you as always for your kindness!
I am using a boolean field in my kendo grid:
"activePin"
model: {
id: "id",
fields: {
accountId: { editable: false },
accountName: { validation: { required: true } },
operatorGroupName: {},
pinCode: { editable: false },
email: { },
cellPhone: { },
note: { },
activePin: { type: "boolean" },
eqpAccess: { editable: false },
}
}
The value of this field is set to true or false based on the value of a status field in the read data:
parse: function(response) {
for (var i = 0; i < response.length; i++) {
if (response[i].status === 'A') {
response[i].activePin = true;
}
else {
response[i].activePin = false;
}
}
return response;
},
The column in my grid displays correctly, and when the row is edited, correctly displays a checked checkbox
when true, and an unchecked checkbox when false.
In edit mode, if I check the checkbox and press update, the model data being sent to my transport Update or
Create functions is always false, regardless if the box is checked before clicking update.
Not sure what I am missing?
i saw from the Kendo UI for Jquery Kendo Grid page is able to achieve the indetermindate state for checkbox but i cant seems to find how do i do it?
I have a grid with multiple selection with checkboxes. I need to be able to deselect the checkbox on a single row programatically. I am able to turn off the row selection class using
$(row).removeClass("k-state-selected");
but I have so far been unable to uncheck the corresponding checkbox.
Thanks in advance.
Eric Katz
Is there a provision to make kendo radio & checkbox controls to take browser default styles?
Upper control has kendo styling & below checkbox has default browser styling, and this will be different for different browsers. Can we make kendo checkbox inherit the browser style.
I have a grid that has 2 checkboxes in it. Before I send the data to the controller I am looping through the rows to get certain values. I have no issues getting the grid data source and iterating through the rows. I am however running into an issue finding out if the checkboxes are checked or not.
Grid
$("#multipleUploadDetailGrid").kendoGrid({
dataSource: {
//data: self.MultipleUploadDetails,
schema: {
model: {
id: "Id",
fields: {
DocumentType: { editable: true, field: "DocumentType" },
FileName: { editable: false, type: "string" },
FileSize: { editable: false, type: "string" },
IsConf: { editable: true, type: "boolean" },
IsTs: { editable: true, type: "boolean" },
}
}
}
},
pageable: false,
selectable: false,
refresh: false,
editable: true,
resizable: true,
reorderable: true,
noRecords: { template: "<div class='k-grid-norecords-template' style='margin:0 auto;position:static;'>No Files Uploaded</div>" },
sortable: {
mode: "multiple",
allowUnsort: true
},
columns: [
{ field: "FileName", title: "Name", width: 150, sortable: true },
{ field: "FileSize", title: "Size", width: 150, sortable: true },
{ field: "DocumentType", title: "Document Type", width: 225, editor: docTypeDropDownEditor, template: "#if (!!data.DocumentType){#<span>#:oir.Utilities.checkNull(DocumentType.Name)#</span>#}else{#<span>No Doc Type</span>#}#"},
{
field: "IsConf", title: "Confidential",
template: "<input name='IsConf' type='checkbox' />", width: 40, sortable: true, headerAttributes: { style: "text-align:center" }, attributes: { style: "text-align:center;" }
},
{ field: "IsTs", title: "Trade Secret", template: "<input name='IsTs' type='checkbox' />", width: 40, sortable: true, headerAttributes: { style: "text-align:center" }, attributes: { style: "text-align:center;" } },
],
});
Code to iterate through datasource.
var grid = $("#multipleUploadDetailGrid").data("kendoGrid");
var ds = grid.dataSource.view();
var dslength = ds.length;
if (dslength > 0) {
for (var i = 0; i < dslength; i++) {
var currRow = ds[i];
//trying to get checkbox value here.
}
}