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

RadCheckBox readonly

13 Answers 773 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
superold
Top achievements
Rank 1
superold asked on 06 Jan 2008, 07:16 PM
Hi,

How can I simulate read-only on a RadCheckBox? the Enabled property changes the text as well.

Thanks,
- jorge

13 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 08 Jan 2008, 02:07 PM
Hello Jorge Delgado-Lopez,

As far as I understand your question, you would like to prevent a RadCheckBox from changing its toggle state without changing its visual appearance. To do this, you could handle the ToggleStateChanging event and set the Cancel property of the arguments to true.

If you have any additional questions, please contact us.

Greetings,
Georgi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
superold
Top achievements
Rank 1
answered on 08 Jan 2008, 04:30 PM
Hi, 

Thanks for the answer, but I need the actual checkbox to show as "disabled". The problem is that when I disable a checkbox the text changes as well. 

thanks
- j
0
Georgi
Telerik team
answered on 09 Jan 2008, 02:12 PM
Hello Jorge Delgado-Lopez,

I have tested the RadCheckBox setting its Enabled property to false, but I did not manage to reproduce the behavior you are describing - the text remains the same, as it should.

In your particular scenario, there should be something else that causes this. Please, give us additional details or send us a small application that demonstrates this problem so we could test it locally. It will help us address any potential issue faster.

Contact us again if you need any further assistance.

Kind regards,
Georgi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ShareDocs
Top achievements
Rank 1
answered on 06 Feb 2013, 07:15 AM
Hi, I'm having the same problem.

I have a checked radCheckBox and when I set it to enable = false, it show as unchecked.

I need a ReadOnly property and cant find it, its not good for me to handle the toggel event.

which property can i use?
I need to prevent the RadCheckBox to change state by the User actions but to show me the state it is on.

thanks
Iair 
0
ShareDocs
Top achievements
Rank 1
answered on 06 Feb 2013, 07:15 AM
Hi, I'm having the same problem.

I have a checked radCheckBox and when I set it to enable = false, it show as unchecked.

I need a ReadOnly property and cant find it, its not good for me to handle the toggel event.

which property can i use?
I need to prevent the RadCheckBox to change state by the User actions but to show me the state it is on.

thanks
Iair 
0
Svett
Telerik team
answered on 11 Feb 2013, 06:47 AM
Hi Lior,

We have already addressed this issue in the latest release - 
Q3 2012 SP1 (2012.3 1211). We recommend upgrading to the latest version in order to take advantage of this and other fixes and improvements.

I am not able to provide you with work around for previous versions of RadControls for Winforms

Kind regards,
Svett
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Stein
Top achievements
Rank 1
answered on 24 Jun 2013, 10:00 AM
To get it to work it seems like you need to set the .Checked-property and THEN set .Enabled to false to get it checked. If the control is set disabled in design it does not get checked.
0
Peter
Telerik team
answered on 27 Jun 2013, 07:21 AM
Hello Stein,

Thank you for sharing your workaround for this issue with community.

I would like to mention that w
e have already addressed this issue and only the users with version prior Q3 2012 should use this workaround.

Should you have any other questions, do not hesitate to ask.

Regards,
Peter
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Dennis
Top achievements
Rank 1
answered on 05 Jul 2013, 03:35 AM
Hi, I think the issue is still open.  If you are using the default theme, it is ok.  However try using a different theme (like VisualStudio2012Light) and the problem is still there.  I'm using the trial version though.  Can this be fixed by just using the theme editor, if yes, how?

I saw from another thread how to modify the theme of the checkbox by making the forecolor transparent but unfortunately it didn't work for me.  The code below (called from Form_Load) will not display the checkbox properly.  It is always unchecked using a different theme like VS2012Light.

checkbox.Enabled = false;
checkbox.Checked = true;

- Dennis
0
Dennis
Top achievements
Rank 1
answered on 09 Jul 2013, 03:29 AM
Anyone?
0
Peter
Telerik team
answered on 09 Jul 2013, 01:08 PM
Hello Dennis,

Thank you for reporting this issue.

This is a regression one and I am reopening the case.

I am not able to provide a workaround through Visual Style Builder because this theme uses images to draw the Checkmark and this image is missing for the disabled state. As a workaround, I can suggest to set the enabled state to true (if false) and then set the Cheked property:
private void SetCheckState(RadCheckBox radCheckBox, bool isChecked)
{
    radCheckBox.Enabled = true;
    radCheckBox.Checked = isChecked;
    radCheckBox.Enabled = false;
}

Please refer to the attached sample project that demonstrates this approach. I hope this helps.

Regards,
Peter
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Dennis
Top achievements
Rank 1
answered on 06 Sep 2013, 03:17 AM
Hi,

Was this fixed in the latest Q2.2013 release?

- Dennis
0
Peter
Telerik team
answered on 09 Sep 2013, 10:36 AM
Hello Dennis,

Thank you for writing back.

We changed the internal structure of the RadCheckBox in order to address this shortcoming and the issue should be fixed in Q3 2013.

I hope this helps.

Regards,
Peter
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
superold
Top achievements
Rank 1
Answers by
Georgi
Telerik team
superold
Top achievements
Rank 1
ShareDocs
Top achievements
Rank 1
Svett
Telerik team
Stein
Top achievements
Rank 1
Peter
Telerik team
Dennis
Top achievements
Rank 1
Share this question
or