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

Checkbox in grid

1 Answer 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
guru
Top achievements
Rank 1
guru asked on 22 Feb 2013, 01:21 PM
Hi I have a checkbox column in a grid , and i need to update the records based on the check box selected.
Remaining columns in the grid are read only

My question here is when I check and followed by uncheck for a particular row , that row is still in edit state , since i am not doing the reverse of "Set". How do i take out that row from saving?

                   $('.check_row').live('click', function (e) {

                        var topDeviceRoleCode = $("#ddlHeaderDeviceRoleCode").data("kendoDropDownList").value();
                        //alert(topDeviceRoleCode);

                        var grid = $("#DeviceDetailsGrid").data("kendoGrid");

                        var models = [];

                        //find the selected models
                        grid.tbody
                                        .find(":checked")
                                        .closest("tr")
                                        .each(function () {
                                            models.push(grid.dataItem(this));
                                        });

                        //update the models value
                        for (var i = 0, length = models.length; i < length; i++) {
                            models[i].set("DeviceRole", topDeviceRoleCode);
                        }

                    });

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 22 Feb 2013, 05:16 PM
Hello,

Please check below link/demo.

Set column editable mode based on another column value changes in kendo UI

Thanks,
Jayesh Goyani
Tags
Grid
Asked by
guru
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or