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

TKDataFormOptionsEditor

3 Answers 44 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.
Ryan
Top achievements
Rank 1
Ryan asked on 13 Jun 2016, 09:14 PM

My view controller inherits from TKDataFormViewController and I set the editor for my field like so:

_dataSource[@"name"].editorClass = [TKDataFormOptionsEditor class];

 

However it only displays one option and whenever I click on the cell it does not take me to another screen to make a selection. How can I get TKDataFormOptionsEditor working?

3 Answers, 1 is accepted

Sort by
0
Ryan
Top achievements
Rank 1
answered on 13 Jun 2016, 09:26 PM
Never mind I figured that one out. I was using my own TKDataForm instead of the one for the inherited one from the view controller. Now I have run into another issue. How can I set the valuesProvider after viewDidLoad?
0
Ryan
Top achievements
Rank 1
answered on 13 Jun 2016, 09:35 PM
Figured it out. It was the exact same thing as the above that was an issue. Is there a delegate method that will allow me to detect when the user selects one of the options from the second screen?
0
Sophi
Telerik team
answered on 15 Jun 2016, 10:50 AM
Hi Ryan,

There is no specific callback for selection out of the options menu. However you can use the didCommitProperty method of the TKDataFormDelegate. It is triggered every time a property has been committed to the object model meaning it will be triggered when you choose option from the TKDataFormOptionsEditor. Consider the code below.
- (void)dataForm:(TKDataForm *)dataForm didCommitProperty:(TKEntityProperty *)property{
    if ([property.name  isEqual: @"section"]){
       // perform logic when item of the options menu is selected
    }
}


Regards,
Sophi
Telerik
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
Ryan
Top achievements
Rank 1
Answers by
Ryan
Top achievements
Rank 1
Sophi
Telerik team
Share this question
or