Thursday, April 23, 2015

ASP.NET CheckBoxList Operations with jQuery - Check Items By Value:

//Check Items by value
   var selValue = [1, 2, 4];
   var $ctrls = $("[id*=CheckBoxList1]");
   for (var i = 0; i < selValue.length; i++) {
       $ctrls.find('input:checkbox[value=' + selValue[i] + ']').prop('checked', true);
   }

No comments:

Post a Comment