Click here to Skip to main content
15,881,033 members
Please Sign up or sign in to vote.
3.57/5 (6 votes)
See more:
Hi,

I am using the checkbox in Template field of grid view. I have used both foreColor and background color property of checkbox but it is not working.

Question:- How to change the tick color of checkbox.
Posted
Comments
sparkingprem 28-Jun-11 10:33am    
right i have same problem.

Have you tried changing the colors in your CSS file, then assigning the CSS class to the CssClass property of the CheckBox?
 
Share this answer
 
You can not change the color of tick, you can use check & uncheck images which can work as a checkbox. you need to save its state somewhere on your page.
 
Share this answer
 
Check out this jQuery UI checkbox[^] demo.
 
Share this answer
 
You can use ToggleButtonExtender from Ajax Control Toolkit and use images.

XML
<asp:CheckBox ID="chkMonM" runat="server" AutoPostBack="true" OnCheckedChanged="chkMonM_CheckedChanged" />
 <cc1:ToggleButtonExtender ID="chkMonM_ToggleButtonExtender" runat="server" CheckedImageAlternateText="Select" CheckedImageUrl="~/images/good.png" Enabled="True" TargetControlID="chkMonM"
                                                        ImageWidth="30" ImageHeight="30" UncheckedImageAlternateText="Deselect" UncheckedImageUrl="~/images/bad.png">
                                                    </cc1:ToggleButtonExtender>
 
Share this answer
 
v2
Comments
Member 12119075 3-Sep-16 2:36am    
am getting error on cc1:ToggleButtonExtender
virang_21 3-Sep-16 18:02pm    
You need to add reference to Ajax Control Toolkit to your project and add assembly reference in your page.

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