我试图在选项卡中显示页面的内容,当我单击记录以显示选项卡时,会在下面的图像中显示错误。
(script5022:script5022:slickgrid需要有效的容器,[object object]在DOM中不存在。slick.grid.js(277,17)
我认为dialog.ts和grid.ts文件之间缺少关系信息或数据。
这是我的grid.ts文件代码
(SCRIPT5022: SCRIPT5022: SlickGrid requires a valid container, [object Object] does not exist in the DOM. slick.grid.js (277,17)
这是我的dialog.ts文件代码
namespace BCPpro_AspNetCore.CashCall
{
@Serenity.Decorators.registerClass()
@Serenity.Decorators.responsive()
@Serenity.Decorators.panel()
export class CashCallCalendarsDialog extends Serenity.EntityDialog<CashCallCalendarsRow, any> {
protected getFormKey() { return CashCallCalendarsForm.formKey; }
protected getIdProperty() { return CashCallCalendarsRow.idProperty; }
protected getDialogType() { return CashCallCircularsDialog; }
protected getLocalTextPrefix() { return CashCallCalendarsRow.localTextPrefix; }
protected getNameProperty() { return CashCallCalendarsRow.nameProperty; }
protected getService() { return CashCallCalendarsService.baseUrl; }
protected form = new CashCallCalendarsForm(this.idPrefix);
private loadedState: string;
// Add the tabs
// CALL CIRCULAR SCHEDULE CALENDAR
private cashCallCalendarsGrid: CashCallCalendarsGrid;
constructor()
{
super();
DialogUtils.pendingChangesConfirmation(this.element, () => this.getSaveState() !== this.loadedState);
// Set the Tab Grid and height of the Grids
// CALL CIRCULAR SCHEDULE CALENDAR
this.cashCallCalendarsGrid = new CashCallCalendarsGrid(this.byId('CashCallCalendarsGrid'));
}
getSaveState()
{
try
{
return $.toJSON(this.getSaveEntity());
}
catch (e)
{
return null;
}
}
loadResponse(data)
{
super.loadResponse(data);
this.loadedState = this.getSaveState();
}
// Load the Tabs and set the tab status (active/disabled)
loadEntity(entity: CashCallCalendarsRow)
{
super.loadEntity(entity);
// Set each of tabs status depending on the forms status
//############################################################
// CALL CIRCULAR SCHEDULE CALENDAR
Serenity.TabsExtensions.setDisabled(this.tabs, 'CashCallCalendars', this.isNewOrDeleted());
this.cashCallCalendarsGrid.YearId = entity.YearId;
}
protected initEntityDialog(itemType, dialog) {
super.initEntityDialog(itemType, dialog);
Serenity.SubDialogHelper.cascade(dialog, this.element.closest('.ui-dialog'));
}
getToolbarButtons()
{
var buttons = super.getToolbarButtons();
return buttons;
}
}
}
我想知道导致错误的丢失数据可能是什么。