Reputation: 11
i am having dialog defined like below
<div data-dojo-type="dijit/Dialog" id="DetailDialog" class="dijitDialog" ...
I just invoked grid inside the dialogwith 10 columns.
var dlg = dijit.byId("DetailDialog");
dlg.set("content", this.Details);
dlg.show();
this._grid.refresh();
dlg.resize();
domStyle.set(dojo.byId('fDetailDialog'), {
left: "162px"
});
The problem is, the dialog loaded with content center but the proper alignment happened only after scroll the page the size and width of the columns are proper.
May I know the best solution for alignment of dialog and resize, especially when we create dialog using div based approach.
Upvotes: 1
Views: 3071
Reputation: 1600
Try calling "layout" method and then resize. If we add elements inside dialog programmatically, call layout to avoid display issues with dialog.
var dialog = dijit.byId("dialogID");
...
dialog.layout();
dialog.resize();
Upvotes: 1