@@ -53,11 +53,11 @@ export class GridAngularComponent implements OnInit {
53
53
</ul>
54
54
` ;
55
55
56
- private _commandQueue = [ ] ;
57
- angularGrid : AngularGridInstance ;
58
- columnDefinitions : Column [ ] ;
59
- gridOptions : GridOption ;
60
- dataset : any [ ] ;
56
+ private _commandQueue : any [ ] = [ ] ;
57
+ angularGrid ! : AngularGridInstance ;
58
+ columnDefinitions : Column [ ] = [ ] ;
59
+ gridOptions ! : GridOption ;
60
+ dataset ! : any [ ] ;
61
61
gridObj : any ;
62
62
isAutoEdit = true ;
63
63
alertWarning : any ;
@@ -270,7 +270,7 @@ export class GridAngularComponent implements OnInit {
270
270
this . dataset = this . mockData ( NB_ITEMS ) ;
271
271
}
272
272
273
- mockData ( itemCount , startingIndex = 0 ) {
273
+ mockData ( itemCount : number , startingIndex = 0 ) {
274
274
// mock a dataset
275
275
const tempDataset = [ ] ;
276
276
for ( let i = startingIndex ; i < ( startingIndex + itemCount ) ; i ++ ) {
@@ -294,11 +294,11 @@ export class GridAngularComponent implements OnInit {
294
294
return tempDataset ;
295
295
}
296
296
297
- onCellChanged ( e , args ) {
297
+ onCellChanged ( e : Event , args : any ) {
298
298
this . updatedObject = args . item ;
299
299
}
300
300
301
- onCellClicked ( e , args ) {
301
+ onCellClicked ( e : Event , args : any ) {
302
302
const metadata = this . angularGrid . gridService . getColumnFromEventArguments ( args ) ;
303
303
console . log ( metadata ) ;
304
304
@@ -317,7 +317,7 @@ export class GridAngularComponent implements OnInit {
317
317
}
318
318
}
319
319
320
- onCellValidation ( e , args ) {
320
+ onCellValidation ( e : Event , args : any ) {
321
321
alert ( args . validationResults . msg ) ;
322
322
}
323
323
@@ -329,7 +329,7 @@ export class GridAngularComponent implements OnInit {
329
329
return true ;
330
330
}
331
331
332
- setAutoEdit ( isAutoEdit ) {
332
+ setAutoEdit ( isAutoEdit : boolean ) {
333
333
this . isAutoEdit = isAutoEdit ;
334
334
this . gridObj . setOptions ( { autoEdit : isAutoEdit } ) ; // change the grid option dynamically
335
335
return true ;
0 commit comments