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

RadDataForm iOS - Gap at top

1 Answer 80 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
SCOTT
Top achievements
Rank 1
SCOTT asked on 28 Apr 2017, 10:48 PM

in the examples (and in my project code) the RadDataForm has a 30-40 pixel gap at the top.  

You can see it when you set the background color to something other than white (see image).

How do I eliminate that?

1 Answer, 1 is accepted

Sort by
0
Rosy Topchiyska
Telerik team
answered on 03 May 2017, 12:51 PM
Hi Scott,

Thank you for contacting us.

There is an issue in the native iOS data where a group header is visible even if no groups are specified. I have logged it in our feedback portal where you can track its status.

You can hide the group header in the iOS data form renderer where you can create a custom delegate and override the UpdateGroupView method to hide the title.

public class CustomDFRenderer : DataFormRenderer
{
    protected override TKDataFormDelegate GetDataFormDelegate(TKDataForm form)
    {
        return new CustomDFDelegate(this);
    }
}
 
public class CustomDFDelegate : DataFormDelegate
{
    public CustomDFDelegate(CustomDFRenderer renderer) : base(renderer)
    {
    }
 
    public override void UpdateGroupView(TKDataForm dataForm, TKEntityPropertyGroupView groupView, uint groupIndex)
    {
        base.UpdateGroupView(dataForm, groupView, groupIndex);
        groupView.TitleView.Hidden = true;
    }
}

And don't forget to add the following assembly attribute to register the custom renderer:
[assembly: ExportRenderer(typeof(RadDataForm), typeof(CustomDFRenderer))]

Please, let us know if you have further questions.

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