RadDataForm iOS - Gap at top

2 posts, 0 answers
  1. SCOTT
    SCOTT  avatar
    1 posts
    Member since:
    Apr 2017

    Posted 28 Apr Link to this post

    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?

  2. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    586 posts

    Posted 03 May Link to this post

    Hi Scott,

    Thank you for contacting us.

    There is an issue in the native iOS data form 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
Back to Top