Skip to main content
All docs
V23.2

DxDropDownEditSettings.DropDownCssClass Property

Specifies CSS classes applied to the editor’s drop-down window.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(null)]
[Parameter]
public string DropDownCssClass { get; set; }

Property Value

Type Default Description
String null

CSS class names delimited by spaces.

Remarks

Specify this property to customize the editor’s drop-down window appearance. The example below demonstrates how to customize the drop-down window’s appearance in a combo box editor:

@inject IDbContextFactory<NorthwindContext> NorthwindContextFactory

<style>
    .my-class {
        <!-- your CSS rules -->
    }
</style>

<DxGrid Data="Products"
        EditMode="GridEditMode.EditRow">
    <Columns>
        <DxGridCommandColumn />
        <DxGridDataColumn FieldName="CategoryId" Caption="Category">
            <EditSettings>
                <DxComboBoxSettings Data="Categories"
                                    ValueFieldName="CategoryId"
                                    TextFieldName="CategoryName"
                                    DropDownCssClass="my-class" />
            </EditSettings>
        </DxGridDataColumn>
        <DxGridDataColumn FieldName="ProductName" Width="25%" />
        <DxGridDataColumn FieldName="UnitPrice" />
        <DxGridDataColumn FieldName="UnitsInStock" />
        <DxGridDataColumn FieldName="QuantityPerUnit" />
    </Columns>
</DxGrid>

@code {
    NorthwindContext Northwind { get; set; }
    List<Product> Products { get; set; }
    List<Category> Categories { get; set; }

    protected override async Task OnInitializedAsync() {
        Northwind = NorthwindContextFactory.CreateDbContext();
        Products = await Northwind.Products.ToListAsync();
        Categories = await Northwind.Categories.ToListAsync();
    }

    public void Dispose() {
        Northwind?.Dispose();
    }
}

To apply or remove CSS classes from the editor’s drop-down window at runtime, use the IDropDownEditSettings.DropDownCssClass property.

Implements

See Also