This is a migrated thread and some comments may be shown as answers.

How to add checkbox in grid

2 Answers 1554 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Seaman
Top achievements
Rank 1
Seaman asked on 05 Apr 2012, 10:59 AM
How to add checkbox in grid 

2 Answers, 1 is accepted

Sort by
0
Paul
Top achievements
Rank 1
answered on 05 Apr 2012, 08:10 PM
This JSFiddle is how I've gotten it to work.

You can also change the template line in the Selected Columns to make the checkbox for display only by disabling it like so:

template'<input type="checkbox" id="SelectedCB" #= Selected ? checked="checked" : "" # disabled="disabled" />' 


Hope that helps.

Cheers,
-Paul
0
Aden
Top achievements
Rank 1
answered on 22 Oct 2012, 02:00 PM

I have 2 checkboxes in a grid, what i want is when one of them is checked while the other is unchecked. I followed this post to added checkbox, but no luck, I am not able to get value of this checkbox,even use $("#divGrid").data("kendoGrid").table[0].rows[index].cells[0].children.ARadio;

It's killing me for days, please help!!!
By the way, can anyone guide me where to create a new thread?

function LoadList(ds) {
    $("#divGrid").kendoGrid({
        dataSource: { data: ds, pageSize: 5 }
        , pageable: { input: true, numeric: false }
        , selectable: true
        , sortable: true
        , scrollable: false
    , columns: [{ title: "A", template: '<input type="checkbox" id="ARadio" ARadio="#= RequestId #"/>' },
                { title: "Requestor Name", field: "RequestorName", template: '<nobr><label style="width:120px;">#=RequestorName#</label></nobr>', width: 150 },
                { title: "Request Type", field: "RequestType" },
                { title: "Business Group", field: "BusinessSilo", template: '<nobr><label style="width:120px;">#=BusinessSilo#</label></nobr>', width: 120 },
                { title: "Access Level", field: "AccessLevel" },
                { title: "Access Justification", field: "AccessJustification", template: '<nobr><label style="width:120px;">#=AccessJustification#</label></nobr>', width: 150 },
                { title: "Date Requested", field: "DateRequested" },
                { title: "Date of Expiry", field: "ExpirationDate"}]
    });
}
Tags
Grid
Asked by
Seaman
Top achievements
Rank 1
Answers by
Paul
Top achievements
Rank 1
Aden
Top achievements
Rank 1
Share this question
or