ColumnMenuService

Represents the service that is passed to the
ColumnMenuTemplate directive.

@Component({
    selector: 'my-app',
    template: `
      <kendo-grid [data]="data" [columnMenu]="true">
         <ng-template kendoGridColumnMenuTemplate let-service="service">
             <span class="k-icon k-i-close" (click)="service.close()"
                 style="position: absolute; right: 5px; top: 5px;cursor: pointer;"></span>
             <kendo-grid-columnmenu-sort [service]="service">
             </kendo-grid-columnmenu-sort>
         </ng-template>
         <kendo-grid-column field="Field1"></kendo-grid-column>
         <kendo-grid-column field="Field2"></kendo-grid-column>
      </kendo-grid>
    `
})

class AppComponent {
  public data: any[] = [{ Field1: 'Foo', Field2: 'Bar' }];
}

Methods

close

Closes the column menu.