RadCheckBox readonly

14 posts, 0 answers
  1. Jorge Delgado-Lopez
    Jorge Delgado-Lopez avatar
    82 posts
    Member since:
    Aug 2007

    Posted 06 Jan 2008 Link to this post

    Hi,

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

    Thanks,
    - jorge
  2. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 08 Jan 2008 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jorge Delgado-Lopez
    Jorge Delgado-Lopez avatar
    82 posts
    Member since:
    Aug 2007

    Posted 08 Jan 2008 Link to this post

    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
  5. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 09 Jan 2008 Link to this post

    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
  6. ShareDocs
    ShareDocs avatar
    76 posts
    Member since:
    Oct 2012

    Posted 06 Feb 2013 Link to this post

    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 
  7. ShareDocs
    ShareDocs avatar
    76 posts
    Member since:
    Oct 2012

    Posted 06 Feb 2013 Link to this post

    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 
  8. Svett
    Admin
    Svett avatar
    728 posts

    Posted 11 Feb 2013 Link to this post

    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.
  9. Stein
    Stein avatar
    25 posts
    Member since:
    Apr 2008

    Posted 24 Jun 2013 Link to this post

    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.
  10. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 27 Jun 2013 Link to this post

    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 >>
  11. Dennis
    Dennis avatar
    12 posts
    Member since:
    Oct 2012

    Posted 04 Jul 2013 Link to this post

    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
  12. Dennis
    Dennis avatar
    12 posts
    Member since:
    Oct 2012

    Posted 08 Jul 2013 Link to this post

    Anyone?
  13. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 09 Jul 2013 Link to this post

    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 >>
  14. Dennis
    Dennis avatar
    12 posts
    Member since:
    Oct 2012

    Posted 05 Sep 2013 Link to this post

    Hi,

    Was this fixed in the latest Q2.2013 release?

    - Dennis
  15. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 09 Sep 2013 Link to this post

    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 >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready