menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class FieldSettingsModel - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class FieldSettingsModel

    Defines data mapping properties for displaying, grouping, and rendering items in ListBox, DropDownList, MultiSelect, or ComboBox.

    Inheritance
    System.Object
    FieldSettingsModel
    Namespace: Syncfusion.Blazor.DropDowns
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class FieldSettingsModel : Object
    Remarks

    FieldSettingsModel lets you bind data models with custom mapping for text, value, icon, group, or disabled state, making dropdowns flexible to arbitrary object graphs.

    Examples
    <SfDropDownList TValue="string" DataSource="@CityList">
      <DropDownListFieldSettings Text="CityName" Value="Id" IconCss="FlagIconCss" GroupBy="CountryCode" />
    </SfDropDownList>

    Constructors

    FieldSettingsModel()

    Declaration
    public FieldSettingsModel()

    Properties

    Disabled

    Gets or sets a property name mapping whether a specific item is disabled (non-selectable).

    Declaration
    public string Disabled { get; set; }
    Property Value
    Type Description
    System.String

    String naming a boolean, integer, or equivalent field.

    GroupBy

    Maps to the property name by which to visually group items in the dropdown UI.

    Declaration
    public string GroupBy { get; set; }
    Property Value
    Type Description
    System.String

    Group key property as string, or null for ungrouped.

    Remarks

    Set for grouped dropdown displays, e.g., by category or section.

    HtmlAttributes

    (Obsolete) Sets HTML attributes on a list item. No longer supported.

    Declaration
    public string HtmlAttributes { get; set; }
    Property Value
    Type
    System.String

    IconCss

    Gets or sets the field/property in your data model that supplies the icon CSS class. Used for decorating items visually.

    Declaration
    public string IconCss { get; set; }
    Property Value
    Type Description
    System.String

    String property; null for no icons.

    Text

    Gets or sets the property name in data source mapping to the text label for each item.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    The property name containing option label text.

    Value

    Gets or sets the data source property providing the value for a selected item.

    Declaration
    public string Value { get; set; }
    Property Value
    Type Description
    System.String

    String naming the value property.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved