Hi,
When I click on pencil icon for edit any row in a Child Grid, I get this error:
ERROR TypeError: Cannot read properties of null (reading 'getAttribute')
This is my code:
The measureActionBegin function, is done correctly in debug, but when exit, I get the error on dev tools of Google Chrome.
Can you help me solve the problem?
Thanks
The same error get on click on the cancel button.
While if I click on save button the error is:
ERROR TypeError: e.hasAttribute is not a function
|
App.component.ts
{
headerText: 'Actions',
width: 70,
commands: [
{
type: 'Edit',
buttonOption: { cssClass: 'e-flat', iconCss: 'e-edit e-icons' },
},
{
type: 'Delete',
buttonOption: { cssClass: 'e-flat', iconCss: 'e-delete e-icons' },
},
{
type: 'Save',
buttonOption: { cssClass: 'e-flat', iconCss: 'e-update e-icons' },
},
{
type: 'Cancel',
buttonOption: {
cssClass: 'e-flat',
iconCss: 'e-cancel-icon e-icons',
},
},
],
}
|
In my application, I have the same code (you can check on my first post) and in your reply (26 November) you confirmed that it's a bug...
So, what I do for solve this bug?
Thanks
|
[app.component.html]
<!-- Template dei campi misure quando si entra in modifica -->
<ng-template #editMeasureDescription let-data>
<div fxLayout="row" fxLayout.lt-sm="column" fxLayoutGap="16px grid" style="padding-top: 16px;">
<mat-form-field fxFlex="85" appearance="legacy">
<mat-label>Description</mat-label>
<input name="description" id="measuredesc-id" (change)="onMeasureDetailChange()" [(ngModel)]="measureDesc" matInput>
</mat-form-field>
</div>
</ng-template>
<ng-template #editMeasureQty let-data>
<mat-form-field fxFlex="100" appearance="legacy" *ngIf="!showFormula" style="padding-top: 16px;">
<input name="qty" id="measureqty-id" (change)="onMeasureDetailChange()" [(ngModel)]="measureQty" matInput>
</mat-form-field>
</ng-template>
<ng-template #editMeasureWidth let-data>
<mat-form-field fxFlex="100" appearance="legacy" *ngIf="!showFormula" style="padding-top: 16px;">
<input name="width" id="measurewidthy-id" (change)="onMeasureDetailChange()" [(ngModel)]="measureWidth" matInput>
</mat-form-field>
</ng-template>
<ng-template #editMeasureLength let-data>
<mat-form-field fxFlex="100" appearance="legacy" *ngIf="!showFormula" style="padding-top: 16px;">
<input name="length" id="measurelength-id" (change)="onMeasureDetailChange()" [(ngModel)]="measureLength" matInput>
</mat-form-field>
</ng-template>
<ng-template #editMeasureHeight let-data>
<mat-form-field fxFlex="100" appearance="legacy" *ngIf="!showFormula" style="padding-top: 16px;">
<input name="height" id="measureheight-id" (change)="onMeasureDetailChange()" [(ngModel)]="measureHeight" matInput>
</mat-form-field>
</ng-template>
<ng-template #editMeasureTotalMeasure let-data>
<mat-form-field fxFlex="100" appearance="legacy" style="padding-top: 16px;">
<input name="totalMeasure" id="measuretotalmeasure-id" disabled [(ngModel)]="measureTotalMeasure" matInput>
</mat-form-field>
</ng-template>
|
|
[app.component.ts]
this.childGrid = {
columns: [
{ field: 'billOfMaterialsCostAnalysisMeasuresId', isPrimaryKey: true, width: 30 },
{ field: 'description', headerText: 'Description', textAlign: 'Left', width: '50%', editTemplate: this.editMeasureDesc },
----
],
};
|