Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
else if (gr.IncludeCost == "NO") {
       $("#chkEditIncludeCost").is(':checked') = false;
   }
Posted
Updated 28-Oct-15 0:57am
v2
Comments
RelicV 28-Oct-15 6:58am    
is(':Checked') is used to check if the checkbox is selected by the user or not.
You cannot assign a value to that.

1 solution

$('#chkEditIncludeCost').prop('checked', true);
$('#chkEditIncludeCost').prop('checked', false);
 
Share this answer
 
Comments
Member 11527624 28-Oct-15 8:18am    
Thank you very much its solved.What does .prop('checked', true); reprsents here
Krunal Rohit 28-Oct-15 8:44am    
.prop() is used for setting the control property.
In this case, checked property is set to true/false.

-KR
Member 11527624 28-Oct-15 8:46am    
Got it :)
CPallini 28-Oct-15 8:28am    
5.

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