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

Checkbox style in radgrid

3 Answers 329 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 30 Dec 2013, 04:29 AM
My checkbox in normal grid view looks like it is grayed but it is not it is enabled.

How do I get checkbox A to look like checkbox B??

checkbox image

thanks for any help!

3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 30 Dec 2013, 08:29 AM
Hi Mike,

If you are using GridCheckBoxColumn in your grid, the expected behavior is that the checkbox is disabled when you are not in edit mode. Please note that this is made that way by design and in general you should not be able to change the checkbox state when you are not in edit mode.

If you want your checkbox to be enabled in normal and in edit mode, what I could suggest is that you use GridTemplateColumn instead.

If further assistance is needed, please elaborate on your exact scenario and if possible, provide the markup of your grid.


Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Mike
Top achievements
Rank 1
answered on 31 Dec 2013, 07:38 AM
thanks Konstantin

template column makes sense. just wanted to be sure there was not a "quicker" way.


But I still have a Q:

I do not want the user to be able to edit the checkbox in item view, but I DO want it to be darker and easier to see for the user so they can decide if they want to edit the row and change the checkbox.

see the attached file row2.jpg, the other fields are not editable but they still are "readable"

the checkbox IS enabled and still gray, when disabled it is very hard to see if the box is checked or not as in "A" in the attached image checkbox.jpg ???

again thanks for any help- (great product btw!)


0
Konstantin Dikov
Telerik team
answered on 02 Jan 2014, 03:19 PM
Hi Mike,

In general, the way the checkbox is rendered is determined by the browser. However, you can add RadFormDecorator control on the page, which will allow you to customize the checkbox. Please note that you will have to create an image that you need to display as disabled checkbox:
<style type="text/css">
    .rfdInputDisabled{
        background:url(disabledCheckBox.png) left top no-repeat!important;
    }
</style>
*Just replace "disabledCheckBox.png" with the correspondent image that you will create.

Hope that helps.


Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Mike
Top achievements
Rank 1
Share this question
or