Please note that this control has been deprecated and replaced with the Grid component, and as such, we recommend migrating to that control. This will not be receiving any new features, bug fixes will be deprioritized. For help or questions on migrating your codebase to the Data Grid, please contact support.

    Blazor Row Pinning

    La tabla de datos / rejilla de datos de Ignite UI for Blazor permite anclar filas utilizando claves o los elementos de la fuente de datos subyacente. Cuando una fila está anclada, se duplicará en la parte superior de la rejilla de datos blazor y permanecerá fija allí con fondo gris claro y su fila real se representará con baja opacidad.

    Blazor Row Pinning Example

    EXAMPLE
    MODULES
    DATA GENERATOR
    DATA SOURCE
    RAZOR
    CSS

    Like this sample? Get access to our complete Ignite UI for Blazor toolkit and start building your own apps in minutes. Download it for free.

    Puede anclar filas en la cuadrícula de datos Blazor agregando el elemento de datos subyacente de la fila de destino a la colección pinnedItems de la cuadrícula Blazor.

    Code Snippet

    <IgbDataGrid Height="100%" Width="100%"
        @ref="DataGridRef"
        DataSource="DataSource" />
    
    @code {
    
        private IgbDataGrid grid;
        public IgbDataGrid DataGridRef
        {
            get
            {
                return grid;
            }
            set
            {
                grid = value;
                OnGridChanged();
                StateHasChanged();
            }
        }
    
        private void OnGridChanged()
        {
            grid.PinnedItems.Add(this.DataSource[2] as Employee);
            grid.PinnedItems.Add(this.DataSource[4] as Employee);
        }
    }
    razor

    API References