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.
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