This is a migrated thread and some comments may be shown as answers.

DataForm Swift Enum Support

1 Answer 29 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
James
Top achievements
Rank 1
James asked on 21 Jul 2016, 09:31 AM

Hello, 

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,

James.

1 Answer, 1 is accepted

Sort by
0
Adrian
Telerik team
answered on 26 Jul 2016, 08:34 AM
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.

Regards,
Adrian
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
Tags
DataForm
Asked by
James
Top achievements
Rank 1
Answers by
Adrian
Telerik team
Share this question
or