Skip to main content
All docs
V25.1
  • .NET 8.0+
    • The page you are viewing does not exist in the .NET Framework 4.6.2+ platform documentation. This link will take you to the parent topic of the current section.

    DxGridModel.ComponentInstanceCaptured Event

    Occurs after the underlying component is created for the current model and allows access to the component instance.

    Namespace: DevExpress.ExpressApp.Blazor.Editors.Models

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

    NuGet Package: DevExpress.ExpressApp.Blazor

    Declaration

    public event EventHandler<ComponentInstanceCapturedEventArgs<IGrid>> ComponentInstanceCaptured

    Event Data

    The ComponentInstanceCaptured event's data class is DevExpress.ExpressApp.Blazor.Components.Models.ComponentInstanceCapturedEventArgs<IGrid>.

    Remarks

    A component model replicates all parameters of the related component. You can use these parameters to configure the underlying component before creation. However, the model does not allow you to access the current component state (for instance, a page index) or call its methods directly.

    Handle the ComponentInstanceCaptured event to access underlying component instance and its full API.

    using DevExpress.ExpressApp;
    using DevExpress.ExpressApp.Blazor.Editors;
    
    public partial class GridListEditorController : ViewController<ListView> {
        protected override void OnViewControlsCreated() {
            base.OnViewControlsCreated();
            if (View.Editor is DxGridListEditor editor) {
                editor.GridModel.ComponentInstanceCaptured += (s, e) => {
                    e.ComponentInstance.CollapseAllGroupRows();
                };
            }
        }
    }
    
    See Also