BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
@ViewChild('grid') doesn't work. We get only properties.
export class AppComponent {
@ViewChild('grid')
public grid;
public gridData;
public dataManager;
data:array;
fieldsvalues:object;
value:string;
ngAfterViewInit() {
this.grid.widget.sortColumn('OrderID');/*call the sort column method */
this.grid.widget.selectRows(2); /*call the select rows method for select the record*/
} |
@ViewChild('myGrid') grid: ElementRef;
And then you get under ngAfterViewInit:
this.grid.nativeElement. ??
and not "widgets"
How do you get the "widget" ???
/// <reference path="../ej/ej.web.all.d.ts" />
/// <reference path="../ej/Jquery.d.ts" />
import {Component} from '@angular/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES} from '@angular/common';
import {EJ_GRID_COMPONENTS} from 'ej/grid.component';
import {EJComponents} from 'ej/core';
import {ViewChild, Injectable} from '@angular/core';
@Component({
selector: 'ej-app',
templateUrl: 'app/app.component.html',
directives: [EJ_GRID_COMPONENTS, CORE_DIRECTIVES]
})
export class AppComponent {
@ViewChild('mygrid') grid:EJComponents<any, any> ; //you can get widget to extend the EJComponents instead of Elementref
public gridData;
public dataManager;
. . .
ngAfterViewInit() {
this.grid.widget.sortColumn('OrderID','ascending');/*call the sort column method */
}
. . . |