jeudi 18 février 2016

Getting only data from the single page in kendo grid

I have a kendo grid with two columns,one is a checkbox column with header checkbox which select and unselect all the checkboxes in the grid..Now the problem is when i select all the checkboxes one by one instead of clicking selectAll checkbox(the header checkbox) the header check box is not checked.. so on the checkbox click event I have written a code which only works for the first page of the grid

var numChkBoxes = $('#UserDivisionGridEdit input[type=checkbox][id!=chkSelectAllDiv]').length;

            var numChkBoxesChecked = $('#UserDivisionGridEdit input[type=checkbox][checked][id!=chkSelectAllDiv]').length;

            if (parseInt(numChkBoxes) == parseInt(numChkBoxesChecked) &&parseInt(numChkBoxes) > 0) {

                document.getElementById('chkSelectAllDiv').checked = true;
            }
            else {
                $('#chkSelectAllDiv').attr('checked', false);
            }

Can anyone help me ,please? Thanks in advance

Aucun commentaire:

Enregistrer un commentaire