DataForm Swift Enum Support

2 posts, 0 answers
  1. James
    James avatar
    4 posts
    Member since:
    Jun 2016

    Posted 21 Jul Link to this post


    Has anyone got any ideas on how to get the DataForm to accept Enums as a DataSource? My source object has a few enums as properties and I was hoping to use a segmented editor to change the selected enum but when I set the source object for the form it seems to ignore the enum properties.

    Any help would be appreciated,


  2. Adrian
    Adrian avatar
    159 posts

    Posted 26 Jul Link to this post

    Hi, James,

    Thank you for contacting us.
    To achieve this you should explicitly specify the editor you want to use and its values. Consider the code snippet below:
    _dataSource[@"enumProperty"].editorClass = [TKDataFormSegmentedEditor class];
    _dataSource[@"enumProperty"].valuesProvider = @[@"L2TP", @"PPTP", @"IPSec"];

    I hope this solves the issue. Do not hesitate to contact us if you need further assistance.

    Telerik by Progress
    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
  3. DevCraft R3 2016 release webinar banner
Back to Top