This is a migrated thread and some comments may be shown as answers.

CheckBoxColumn with Cross Mark

2 Answers 181 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Bradley Lane
Top achievements
Rank 1
Bradley Lane asked on 22 Feb 2012, 04:48 AM
Hi,

I want to change a GridViewCheckBoxColumn to display a red Cross Mark instead of the green Tick Mark.

Is this possible and if so how?

Kind Regards,
Brad

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Feb 2012, 08:15 AM
Hello,

Check the following forum thread which discussed similar scenario.
GridViewCheckBoxColumn changed CheckBox image

Thanks,
Princy.
0
Boryana
Telerik team
answered on 24 Feb 2012, 03:32 PM
Hello everyone,

Thank you for writing.

Princy has pointed a related forum thread that contains one possible implementation of the requirement. Simply handle the CellFormatting event, set the CheckPrimitiveStyle to None and the DrawFill to False, and assign images to each state accordingly.

Another way of getting the same behavior is through using a custom theme. Here are the list of steps you need to make:
1. Start the Visual Style Builder tool (Starting VSB). You might also want to get acquainted with its basic concepts (Getting Started).
2. Export the built-in themes and load the tssp you would like to customize (Loading Predefined Themes)
3. In the Control Panel (appearing on the left) expand RadCheckMark and select the nested RadCheckMark item.
4. In the Elements panel select and expand the CheckPrimitive item. Navigate to the CheckPrimitiveStyle and set it to None. In the Element states panel select the ToggleState=on state and again set the CheckPrimitiveStyle to None.
5. In the Elements panel select and expand  the ImagePrimitive item. Assign the appropriate images to the Image property for both RadCheckMark and RadCheckMark.ToggleState=on states.
6. Save the tssp file (Saving and Loading Themes)
7. Load the theme in your application (Load Themes from an External File, Load Themes from a Resource)

I hope you find this useful. Do not hesitate to write back if you have further queries.

Regards,
Boryana
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
Bradley Lane
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Boryana
Telerik team
Share this question
or