mercredi 22 avril 2015

How Do i Get a checkbox value in datatable while using Paging

I have Created a datatable with first column as checkbox for each row and i was doing a ajax call while on successing i was trying to check the checkbox but it was checking for only first page. not for other pages.

below is my code, please help me in that.

$.ajax({   
     type: 'GET', 
     url: '/PriceList/GetCheckedAccount/',
     data: { get_param: data1 },  
     dataType: 'json', 
     success: function (response) {            
           //alert("success");
      for (var i = 0, len = response.aaData.length; i < len; i++)    {       

         var id = response.aaData[i][1];         
         var chk = $(".chkBox" + id);    
        chk.attr("checked", true);    
     }    
  } 
});




Aucun commentaire:

Enregistrer un commentaire