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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

The appearance of DataFormGroupItem , generated by SfDataform is so ugly. How can we change this.

Thread ID:

Created:

Updated:

Platform:

Replies:

147505 Sep 13,2019 05:13 AM UTC Sep 17,2019 10:13 AM UTC Xamarin.Forms 2
loading
Tags: SfDataForm
Tung
Asked On September 13, 2019 05:14 AM UTC

Hello,

The generated DataFormGroupItem is ugly

As per your documentation, we can change the GroupName and AllowExpandCollapse.

How can we change other attributes like margin, padding, border, color, background color? Like the sample in your demo app



Karthikraja Arumugam [Syncfusion]
Replied On September 13, 2019 12:37 PM UTC

Hi Tung, 
 
Thank you for contacting Syncfusion support. 
 
Currently, we are validating your requirement of “Customizing DataFormGroupItem header while custom DataFormGroupItem generated in XAML page”. We will check and update you further details on or before September 17, 2019. We appreciate your patience until then. 
 
Regards, 
Karthik Raja A 


Karthikraja Arumugam [Syncfusion]
Replied On September 17, 2019 10:13 AM UTC

Hi Tung, 
 
Thank you for your patience. 
 
We have checked your requirement of “Customizing GroupHeader view in DataForm”. DataForm supports to customize GroupHeaer by using custom DataFormLayoutManager class, in which override GenerateViewForGroupHeader method to provide a new view or customize the existing view and GetLeftPaddingForGroupHeader method to provide left padding value for group header view. 
 
Please refer the following code example for the same, 
 
[C#] 
 
dataForm.LayoutManager = new DataFormLayoutManagerExt(dataForm); 
 
public class DataFormLayoutManagerExt : DataFormLayoutManager 
{ 
        public DataFormLayoutManagerExt(SfDataForm dataForm) : base(dataForm) 
        { 
 
        } 
 
        protected override View GenerateViewForGroupHeader(DataFormGroupItem dataFormGroupItem) 
        { 
            var groupHeader = base.GenerateViewForGroupHeader(dataFormGroupItem); 
            groupHeader.BackgroundColor = Color.Aqua; 
            return groupHeader; 
        } 
 
        protected override int GetLeftPaddingForGroupHeader(DataFormGroupItem dataFormGroupItem) 
        { 
            return 10; 
        } 
 } 
 
We have prepared a sample based on your requirement, please find the sample by the following link. 

Sample link: DataFormGroupHeader 
 
In the sample, as per your requirement we have changed the group header background and left padding value. 
 
You can also refer our online user guide documentation regarding custom DataFormLayoutManager class by the following link, 
 
 
We hope this helps. Please let us know if need any further assistance. 
 
Regards,
Karthik Raja A 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon