DxGridListEditor.CustomizeViewItemControl<T>(Controller, Action<T>) Method
Accesses the DxGridListEditor’s Property Editors and allows to customize them.
Namespace: DevExpress.ExpressApp.Blazor.Editors
Assembly: DevExpress.ExpressApp.Blazor.v24.1.dll
NuGet Package: DevExpress.ExpressApp.Blazor
Declaration
public void CustomizeViewItemControl<T>(
Controller controller,
Action<T> customizeControl
)
where T : ViewItem
Parameters
Name | Type | Description |
---|---|---|
controller | Controller | The controller. |
customizeControl | Action<T> | The customization function. |
Type Parameters
Name | Description |
---|---|
T | The editor type. |
Remarks
The following example demonstrates how to use the DxGridListEditor.CustomizeViewItemControl
method to customize the background for a StringPropertyEditor
:
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Blazor.Components.Models;
using DevExpress.ExpressApp.Blazor.Editors;
public class CustomizeInlinePropertyEditorController : ViewController<ListView> {
protected override void OnActivated() {
base.OnActivated();
if(View.Editor is DxGridListEditor gridListEditor) {
gridListEditor.CustomizeViewItemControl<StringPropertyEditor>(this, CustomizePropertyEditor);
}
}
private void CustomizePropertyEditor(StringPropertyEditor stringPropertyEditor) {
if(stringPropertyEditor.ComponentModel is DxTextBoxModel textBoxModel) {
textBoxModel.CssClass += " background-orange";
}
}
}
.background-orange {
background-color: darkorange;
}
See Also