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
Related API Members
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