Click here to Skip to main content
15,910,886 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
for (var i = 0; i < _checkedData.length; i++) {
document.getElementById('testcheck').value = document.getElementById('testcheck').value + '!' + _checkedData[i];
}


JavaScript
$.ajax({
            url: '/COCS/ISI/COCSIntimation/AuthorizeSubmit' + "&checkeddata=" + document.getElementById('testcheck').value,
            data: _checkedData,
            type: 'POST',
            contentType: 'application/json; charset=utf-8',


JavaScript
success: function (result) {
                $('#grid').data('kendoGrid').dataSource.data(result);
            },
            dataType: 'json'
        });



$(function () {
$('#grid').on('click', '.chkbxAuthorize', function () {
var checked = $(this).is(':checked');
var grid = $('#grid').data().kendoGrid;
var dataItem = grid.dataItem($(this).closest('tr'));


//var grid = $("#grid").data("kendoGrid");
var data = grid.dataSource.data();
//var checked = $(this).is(':checked');
//var dataItem = grid.dataItem($(this).closest('tr'));

var totalRows = $("#grid td :checkbox").length;
var AuthChecked = $(".chkbxAuthorize:checked").length;

if (checked) {
_checkedData.push(dataItem);
}
});


<input type="hidden" id="testcheck" value="" name="hdn">
Posted
Comments
F-ES Sitecore 14-Dec-15 8:46am    
It's impossible to tell from what you've posted. However I see you are adding data to the url and also the data portion of the POST so that could be confusing things. Use Fiddler or the browser's dev tools to see what data is being passed to your controller, or to check for javascript errors.
Sathish km 14-Dec-15 8:59am    
k.How can i pass the data from _checkedData[i] to post method? pls give me a solution
Rajdeep Debnath 14-Dec-15 9:55am    
make the _checkedData global and try ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900