Skip to main content
A newer version of this page is available. .
All docs
V22.1
.NET 6.0+
  • The page you are viewing does not exist in the .NET Framework 4.5.2+ platform documentation. This link will take you to the parent topic of the current section.
  • The page you are viewing does not exist in the .NET Standard 2.0+ platform documentation. This link will take you to the parent topic of the current section.

DxGridModel Class

Exposes members of the underlying DxGrid component.

Namespace: DevExpress.ExpressApp.Blazor.Editors.Models

Assembly: DevExpress.ExpressApp.Blazor.v22.1.dll

NuGet Package: DevExpress.ExpressApp.Blazor

Declaration

public class DxGridModel :
    ComponentModelBase

The following members return DxGridModel objects:

Remarks

Use this class’ members to access properties and events of the underlying DxGrid component.

Access the DxGrid Component Properties

The List View editor exposes the GetGridAdapter method that returns the IDxGridAdapter component adapter.

Use the component adapter’s IDxGridAdapter.GridModel property to access the grid component properties.

The code sample below demonstrates a controller in the Blazor project that changes a ColumnResizeMode property value.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Blazor.Editors;

namespace MySolution.Blazor.Server.Controllers {
    public partial class ColumnResizeModeViewController : ViewController<ListView> {
        public ColumnResizeModeViewController() {
            InitializeComponent();
        }
        // ...
        protected override void OnViewControlsCreated() {
            base.OnViewControlsCreated();
            if (View.Editor is DxGridListEditor gridListEditor) {
                IDxGridAdapter dataGridAdapter = gridListEditor.GetGridAdapter();
                // The `dataGridAdapter.GridModel` code returns 
                // an instance of the DxGridModel type
                dataGridAdapter.GridModel.ColumnResizeMode = 
                    DevExpress.Blazor.GridColumnResizeMode.ColumnsContainer;
            }
        }
        // ...
    }
}

Inheritance

Object
DevExpress.ExpressApp.Blazor.Components.Models.ComponentModelBase
DxGridModel
See Also