alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class DataFormDisplayOptionsAttribute

    Provides attribute-based display configuration options for fields in the SfDataForm component, enabling enhanced layout customization and editor arrangement.

    Inheritance
    object
    Attribute
    DataFormDisplayOptionsAttribute
    Inherited Members
    Attribute.Equals(object)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, bool)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, bool)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, bool)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, bool)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, bool)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, bool)
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, bool)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, bool)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
    Attribute.GetHashCode()
    Attribute.IsDefaultAttribute()
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, bool)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, bool)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, bool)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, bool)
    Attribute.Match(object)
    Attribute.TypeId
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.DataForm
    Assembly: Syncfusion.Blazor.dll
    Syntax
    [AttributeUsage(AttributeTargets.All)]
    public sealed class DataFormDisplayOptionsAttribute : Attribute
    Remarks

    Use the DataFormDisplayOptionsAttribute to designate specific display preferences for fields generated within the SfDataForm. It is most commonly applied to model properties for fine-grained control of data form layouts.

    Examples

    The following example demonstrates how to apply the DataFormDisplayOptionsAttribute to a model property for column spanning.

    public class Employee
    {
        [DataFormDisplayOptions(ColumnSpan = 2)]
        public DateTime HireDate { get; set; }
    }

    Constructors

    DataFormDisplayOptionsAttribute()

    Declaration
    public DataFormDisplayOptionsAttribute()

    Properties

    ColumnSpan

    Gets or sets the column span that indicates how many columns a field editor should occupy within the form layout in the SfDataForm component.

    Declaration
    public int ColumnSpan { get; set; }
    Property Value
    Type Description
    int

    An int representing the number of columns to span the respective field editor. The default is 1.

    Remarks

    This property is particularly useful in auto-generated forms when fields should cover multiple columns within column-based layouts. Applying ColumnSpan ensures the respective field will visually expand across the desired number of columns.

    Usage Example:
    [DataFormDisplayOptions(ColumnSpan = 2)]
    public DateTime DateTimeValue { get; set; }

    When both the ColumnSpan property of the DataFormDisplayOptionsAttribute and the ColumnSpan property of the SfDataForm component are specified, the attribute value on the property takes precedence.

    Examples

    This example shows how to set the column span for a date field:

    [DataFormDisplayOptions(ColumnSpan = 2)]
    public DateTime DateOfBirth { get; set; }
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved