githubEdit

Load Global Grid Options

You might find yourself re-using the same configurations over and over, in that case we got you covered. You can change any of the global options directly in your App Module through forRoot which accept an optional object of Grid Options.

1. for Angular-Slickgrid < 10.0 - Include it in your App Module (or App Config for Standalone)

import { AngularSlickgridModule } from 'angular-slickgrid';

@NgModule({
  declarations: [ /*...*/ ],
  imports: [
    AngularSlickgridModule.forRoot({
      enableAutoResize: true,
      autoResize: {
        containerId: 'grid-container',
        sidePadding: 15
      },
      enableFiltering: true,
      enableCellNavigation: true,
      enablePagination: true,
      enableSelection: true,
      enableTranslate: true,
      sanitizer: (dirtyHtml) => DOMPurify.sanitize(dirtyHtml, { ADD_ATTR: ['level'], RETURN_TRUSTED_TYPE: true }),
      //...
    }),
  ],
  providers: [ /*...*/ ]
});

export class AppModule { }

2. for Angular-Slickgrid >= 10.x - Standalone Component

List of Global Options

For the complete list of available Grid Option, you can take a look at the Default Grid Optionsarrow-up-right file and/or technically any of the options from the grid options - interfacearrow-up-right are configurable.

Last updated