alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class FieldSettingsModel

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

    Inheritance
    object
    FieldSettingsModel
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.DropDowns
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class FieldSettingsModel
    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
    [JsonPropertyName("disabled")]
    public string Disabled { get; set; }
    Property Value
    Type Description
    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
    [JsonPropertyName("groupBy")]
    public string GroupBy { get; set; }
    Property Value
    Type Description
    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
    [Obsolete("HtmlAttributes property is obsolete and no longer supported.", false)]
    [JsonPropertyName("htmlAttributes")]
    public string HtmlAttributes { get; set; }
    Property Value
    Type
    string

    IconCss

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

    Declaration
    [JsonPropertyName("iconCss")]
    public string IconCss { get; set; }
    Property Value
    Type Description
    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
    [JsonPropertyName("text")]
    public string Text { get; set; }
    Property Value
    Type Description
    string

    The property name containing option label text.

    Value

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

    Declaration
    [JsonPropertyName("value")]
    public string Value { get; set; }
    Property Value
    Type Description
    string

    String naming the value property.

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