dynamic readonly properties

6 posts, 0 answers
  1. Grant
    Grant avatar
    1 posts
    Member since:
    Oct 2011

    Posted 31 Oct 2011 Link to this post

    Hi there,

    I want to be able to do the following and don't seem to be able to:

    Let's say I have property A, B and C.

    • A is a Boolean (checkbox).
    • If I choose A as checked option C is editable, otherwise option C is readonly.

    Where/how do I override the enabled/readonly properties of the property definition based on another property's value/state?

    I have disabled autopropertygeneration and am binding using my own xaml and model.

  2. Grant
    Grant avatar
    4 posts
    Member since:
    Aug 2011

    Posted 02 Nov 2011 Link to this post

    The closest I have come to a solution ( which is not ideal ) is by binding a wrapping element around it and binding to it:
                         <DataTemplate>
                                    <Grid IsEnabled="{Binding HorizontalStartIsEnabled}">
                                        <Controls:RadNumericUpDown Value="{Binding HorizontalStart}" />
                                    </Grid>
                                </DataTemplate>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 03 Nov 2011 Link to this post

    Hi Grant,

    We plan to introduce a read-only mode for RadPropertyGrid in the near future. It will be available with the Q3 release. Please do not hesitate to contact us if any further inquiries related to RadControls occur.

    Regards,
    Ivan Ivanov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  5. David
    David avatar
    12 posts
    Member since:
    Mar 2009

    Posted 01 Apr 2012 Link to this post

    Any progress on a read only version of the property grid? I am using Q1 2012 and can't find anything.
  6. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 02 Apr 2012 Link to this post

    Hi David,

    We have introduced an IsReadOnly property for both RadPropertyGrid and PropertyDefinition. Would you please test it and confirm whether this feature meets your requirements?

    Kind regards,
    Ivan Ivanov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  7. David
    David avatar
    12 posts
    Member since:
    Mar 2009

    Posted 02 Apr 2012 Link to this post

    My Bad :) Even though I had uninstalled the previous version of the controls and installed the Q1 2012 release I had forgotten to change all my references and my application was still picking up the older dlls from my build folder. As soon as I updated the refereces I found the IsReadOnly attribute exactly where I expected it and it worked fine.
    Thanks
    David Goughnour
Back to Top
UI for WPF is Visual Studio 2017 Ready