DataForm Swift Enum Support

Thread is closed for posting
2 posts, 0 answers
  1. James
    James avatar
    4 posts
    Member since:
    Jun 2016

    Posted 21 Jul 2016 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
    174 posts

    Posted 26 Jul 2016 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
Back to Top