BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
[app.component.html]
<ejs-grid class="sortingenabled" #grid [dataSource]='data' allowPaging='true' allowSorting='true' [sortSettings]='initialSort' (load)="onload($event)" (dataBound)="dataBound($event)" (actionComplete)='actionComplete($event)'>
<e-columns>
. . . .
</e-columns>
</ejs-grid>
[app.component.ts]
export class AppComponent {
public data: Object[];
public initialSort: Object;
public pageSettings: Object;
public isInitialRender:boolean=false;
@ViewChild("grid")
public grid:GridComponent;
onload(){
this.isInitialRender=true;
}
dataBound(){
if(this.isInitialRender){
this.isInitialRender=false;
this.grid.getHeaderContent().addEventListener("mousedown",function(e){
var grid = (document.getElementsByClassName("e-grid")[0]as any).ej2_instances[0];
debugger;
if((e as any).metaKey){
grid.sortModule.enableSortMultiTouch=(e as any).metaKey;
}
})
}
}
actionComplete(args){
if(args.requestType == "sorting"){
var grid = (document.getElementsByClassName("e-grid")[0]as any).ej2_instances[0];
grid.sortModule.enableSortMultiTouch=false;
}
}
|