Telerik Forums
Kendo UI for jQuery Forum
1 answer
74 views

(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!

Zornitsa
Telerik team
 answered on 22 Aug 2023
0 answers
145 views

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?

Hunter
Top achievements
Rank 1
 asked on 26 Oct 2022
1 answer
273 views

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?

Georgi
Telerik team
 answered on 06 Jul 2022
1 answer
720 views

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

Martin
Telerik team
 answered on 14 Oct 2021
1 answer
186 views

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.

 

Georgi Denchev
Telerik team
 answered on 16 Aug 2021
2 answers
7.7K+ views

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.
             }
        }

 

Jed
Top achievements
Rank 1
Iron
 answered on 15 Jun 2021
0 answers
158 views
Hi Team,
 
Need clarity about Kendo Grid - Header template is DropDown List.
I have more than one column in Grid datasource which contains 10 rows of records. Applied filterable true for each and every column. I selected the first column filtered with some value. Which is showing 5 rows. Selected some other row which is not filtered the values from the 5 rows. Showing the filtered results from the 10 rows.
 
But I need to show the results from 5 rows. How can I achieve it?
Please help me with this issue. I need your response.
Kindly check and let me know as soon as possible.
Karthika
Top achievements
Rank 1
 asked on 09 Jun 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?