We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DataForm Group Text/Label

Hello,

is there a way to customize a little bit more the Group Text. I'm already using the SfExpander and would like to style the groups in a similar way: i.g. Icon - on the right side, or left padding for the text (space between background color and text)


I'm already using the DataFormLayoutManager.

Thank you very much!

Kind regards,

Robert


9 Replies

SS SaiGanesh Sakthivel Syncfusion Team November 2, 2022 01:28 PM UTC

Your requirement can be achieved by setting the padding for the group header with the help of GetLeftPaddingForGroupHeader override method in the DataFormLayoutManagerExt class. Please refer to the code snippet for your reference.


Code Snippet

public class DataFormLayoutManagerExt : DataFormLayoutManager

{

    public DataFormLayoutManagerExt(SfDataForm dataForm) : base(dataForm)

    {

 

    }

 

    protected override int GetLeftPaddingForGroupHeader(DataFormGroupItem dataFormGroupItem)

    {

        return 150;

    }

}


Please refer to the demo sample in the following locations.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/DataFormXamarin352243226


Please let us know if you have any concerns.



RP Robert Pichler November 2, 2022 01:49 PM UTC

Hi,

thank you very much for your answer.

I already tried it and and unfortunately it works like margin - not padding:


With padding I would expect it like that (photoshop)

 

Thank you,

kind regards,

Robert




SS SaiGanesh Sakthivel Syncfusion Team November 3, 2022 01:06 PM UTC

Currently, we are checking the reported scenario from our end. We will update you on further details on November 8, 2022. We appreciate the patience until then.



SS SaiGanesh Sakthivel Syncfusion Team November 8, 2022 04:30 PM UTC

#Regarding Improvements to set the padding for the GroupHeader Text in the Dataform

We have logged the issue report for the same. We will fix the issue and include the issue fix in our Weekly nuget release which is expected to roll out on November 29, 2022. We appreciate your patience until then.


You can track the status of this report through the following feedback link,

https://www.syncfusion.com/feedback/38935/improvements-to-set-the-padding-for-the-groupheader-text-in-the-dataform


Note: The provided feedback link is private, you need to login to view this feedback.



SS SaiGanesh Sakthivel Syncfusion Team November 29, 2022 01:45 PM UTC

Hi Robert,


Due to the testing phase, we could not include the fix in our weekly nuget release as promised. We will include it in our upcoming weekly nuget release which is expected to roll out in the month of December 6, 2022. We will let you once release rolled out and appreciate your patience until then.


Regards,
SaiGanesh Sakthivel



RP Robert Pichler replied to SaiGanesh Sakthivel November 29, 2022 08:07 PM UTC

no problem, thank you for the information!



SS SaiGanesh Sakthivel Syncfusion Team November 30, 2022 10:50 AM UTC

Hi Robert,


Thank you for the update. We will let you know once the release rolls out.


Regards,

SaiGanesh Sakthivel



SS SaiGanesh Sakthivel Syncfusion Team December 7, 2022 06:04 AM UTC

Hi Robert,


#Regarding Improvements to set the padding for the GroupHeader Text in the Dataform

Your requirement can be achieved with the help of GenerateViewForGroupHeader override method. Inside the method, you can set the padding for the GroupHeader view. Please refer to the following code snippet for your reference.


Code snippet

public class DataFormLayoutManagerExt : DataFormLayoutManager

{

    public DataFormLayoutManagerExt(SfDataForm dataForm) : base(dataForm)

    {

 

    }

 

    protected override View GenerateViewForGroupHeader(DataFormGroupItem dataFormGroupItem)

    {

        var label = base.GenerateViewForGroupHeader(dataFormGroupItem);

        (label as Label).Padding = new Thickness(20, 0, 0, 0);

        return label;

    }

}


We have faced the issue while setting the padding and fixed the issue from our end. Due to the testing phase, we have prepared patch including the fix. Before installing the patch, kindly remove bin and obj folders from all the projects of solution and clear NuGet cache.


Please refer our following KB document to clear nuget cache.

https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache

   

Set Up: https://syncfusion.com/Installs/support/patch/20.3.0.56/1190712/F178570/SyncfusionPatch_20.3.0.56_1190712_12072022122433573_F178570.exe


Custom Assemblies: https://syncfusion.com/Installs/support/patch/20.3.0.56/1190712/F178570/SyncfusionPatch_20.3.0.56_1190712_12072022122433573_F178570.zip


Nuget: https://syncfusion.com/Installs/support/patch/20.3.0.56/1190712/F178570/SyncfusionNuget_20.3.0.56_1190712_12072022122433573_F178570.zip


Disclaimer:    

Please note that we have created this patch for version 20.3.0.56 specifically to include the issue.

We will include the implemented feature in our upcoming 2022 Volume 4 release which is expected to roll out in Month of December, 2022. We appreciate your patience until then.


Regards,
SaiGanesh Sakthivel



SS SaiGanesh Sakthivel Syncfusion Team December 22, 2022 06:55 AM UTC

Hi Robert,


#Regarding Improvements to set the padding for the GroupHeader Text in the Dataform

We are glad to announce that our Essential Studio 2022 Volume 4 Main Release V20.4.0.38 is rolled out and the reported issue fix is available for download under the following link.


https://www.syncfusion.com/forums/179561/essential-studio-2022-volume-4-main-release-v20-4-0-38-is-available-for-download


Feedback: https://www.syncfusion.com/feedback/38935/improvements-to-set-the-padding-for-the-groupheader-text-in-the-dataform


Release note: https://help.syncfusion.com/xamarin/release-notes/v20.4.0.38?type=all#sfDataForm-bug-fixes


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Regards,
SaiGanesh Sakthivel


Loader.
Live Chat Icon For mobile
Up arrow icon