[ReadOnly] CheckBox

2 posts, 0 answers
  1. Mikas
    Mikas avatar
    7 posts
    Member since:
    Aug 2016

    Posted 10 Nov 2017 Link to this post

    I have the following but it appears the ReadOnly Attribute is ignored?


            [DisplayOptions(Position = 3, ColumnPosition = 0, Header = "Completed")]
            public bool COMPLETED { get; set; }



  2. Lance | Manager Technical Support
    Lance | Manager Technical Support avatar
    1193 posts

    Posted 10 Nov 2017 Link to this post

    Hello Mike,

    I'm not able to replicate the issue with the provided information.


    I have created an example, find it attached. I used the following:

            <telerikInput:RadDataForm  x:Name="dataForm" />

    [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
    namespace ReadOnlyProperties.Portable
        public partial class StartPage : ContentPage
            public StartPage()
                dataForm.Source = new Job();
        public class Job
            [DisplayOptions(Position = 1, ColumnPosition = 0, Header = "Job Title")]
            public string JobTitle { get; set; }
            [DisplayOptions(Position = 2, ColumnPosition = 0, Header = "Job Id")]
            public int JobId { get; set; }
            [DisplayOptions(Position = 3, ColumnPosition = 0, Header = "Completed")]
            public bool COMPLETED { get; set; }

    and result is as expected at runtime, the CheckBox/Swicth is disabled.

    Here is a screenshot of iOS and UWP side-by-side:

    Possible Solution

    The only thing I can think of at this point, is that maybe you recently added the attribute to the class, but the deployed app was using an outdated build of the PCL. Xamarin is known to do this, to see if this is the case, do a clean and rebuild of both PCL and platform projects. Then, redeploy.

    Next Steps

    If that doesn't fix it, please submit a support ticket here with a reproducible so that we can replicate it on our end for further investigation. If it's easier, you can use my demo to replicate it and send us that instead.

    Lance | Tech Support Engineer, Sr.
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top