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

Segment in DataForm

1 Answer 50 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.
Jeff
Top achievements
Rank 1
Jeff asked on 25 Jul 2016, 03:17 AM

IN iOS, segment can be set by segment1.selectedSegmentIndex = 0; 

How set the segment in DataForm 

1 Answer, 1 is accepted

Sort by
0
Adrian
Telerik team
answered on 27 Jul 2016, 08:51 AM
Hi, Jeff,

Thank you for contacting us.

Currently there is an issue with changing the selectedIndex property of the segmented editor. It will be addressed in a future release. I also updated your Telerik points for reporting this. Currently to achieve what you need to call updateControlValue of the editor after you change the selectedIndex. Consider the code below:
- (void)dataForm:(TKDataForm *)dataForm updateEditor:(TKDataFormEditor *)editor forProperty:(TKEntityProperty *)property
{  
    if ([property.name isEqualToString:@"protocol"]) {
        ((TKDataFormSegmentedEditor*)editor).selectedIndex = 2;
        [editor updateControlValue];
    }
}

I hope this helps.

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
Jeff
Top achievements
Rank 1
Answers by
Adrian
Telerik team
Share this question
or