I have a scenario, where i want to show a grid within an ejs-dialog -> on button click event.
file.html Code
<ejs-dialog #creditSumDialog id="creditSumDialog"
isModal="true" showOnInit="true" [visible]="false" [target]="targetElement"
style="max-width: 650px; width:auto; height: 600px !important; min-height: 250px !important; margin: 0 15px">
<ng-template #content>
<div>
<ejs-grid id="machineSelectorGrid" #machineSelectorGrid [dataSource]="ipsOuTimeModel" [allowSorting]="true"
[allowResizing]="true" style=" height:auto; width:auto" [toolbar]="toolbar" [editSettings]="editSettings">
<e-columns>
<e-column field="id" headerText="Id" width="70" [allowEditing]="false" [visible]="false"></e-column>
<e-column field="name" headerText="{{ 'Machine.ShiftName'| translate }}"
width="auto"></e-column>
<e-column field="validFrom" headerText="{{ 'Machine.ValidFrom'| translate }}"
width="auto"></e-column>
</e-columns>
</ejs-grid>
</div>
</ng-template>
</ejs-dialog>
public toolbar: ToolbarItems[];
public editSettings: EditSettingsModel;
this.toolbar = ['Add', 'Delete'];
this.editSettings = { allowEditing: true, allowAdding: true, allowDeleting: true, newRowPosition: 'Bottom'};
public onClickOpenShiftModelDialog(args: any){
this.shiftModelDialogTitle = this._translatePipe.transform('Credits.CreditSumTitle');
// this.loadCreditSum(this.fromDate);
this.creditSumDialog.buttons = [
{
click: this.onClickOpenShiftModel.bind(this),
buttonModel: {
content: this._translatePipe.transform('Button.Ok')
}
},
{
click: this.onClickHideShiftModelDialog.bind(this),
buttonModel: {
content: this._translatePipe.transform('Button.Cancel'),
isPrimary: true
}
}
];
this.creditSumDialog.show();
}
public onClickHideShiftModelDialog() {
this.creditSumDialog.hide();
}
public onClickOpenShiftModel() {
this.creditSumDialog.hide();
}
I can see the dialog buttons properly until we don't have "editsettings" for the grid.Please refer attached screenshot
But when we apply the "editsettings" in the grid then dialog buttons size are not visible properly. Please refer attached screenshot
Attachment:
Buttons_After_Editsetting_779bbcee.zip