How to expose Read-Only List of Integers

4 posts, 1 answers
  1. Michael
    Michael avatar
    23 posts
    Member since:
    Mar 2014

    Posted 28 Mar 2014 Link to this post

    Hello,

    We have a property to display that is a List{Integer}. This should be a readonly only collection. Is the PropertyGrid smart enough to work with ReadOnlyCollections? Or what sort of DataTemplate magic do we need to do wiring it up?

    Similar question for custom types like Enums, or strings, etc.

    Thank ye...

    Best regards.
  2. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 02 Apr 2014 Link to this post

    Hi Michael,

    RadPropertyGrid should display the information from the property List<integer> through a CollectionEditor. You can check our CollectionEditors online documentation for more information.

    Regards,
    Didie
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Michael
    Michael avatar
    23 posts
    Member since:
    Mar 2014

    Posted 02 Apr 2014 Link to this post

    Follow on question, since the property(ies) are readonly, or plausibly the collection(s) themselves are ReadOnlyCollection{int}, for instance, the listing disabled font is a bit light, hard to see. Which property(ies) could we stylize and set to something different? Thank ye...
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 07 Apr 2014 Link to this post

    Hi,

    You can try assigning a Style targeting the CollectionEditor element.
    For example:
    <Style TargetType="telerik:CollectionEditor">
        <Setter Property="FontSize" Value="16"/>
    </Style>

    Regards,
    Didie
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top