Hi John,
Greeting from Syncfusion support.
We have reviewed your query along with shared screenshot and
understand that you have concerns in the Dashboard Layout component. We suggest
that you follow the instructions below to address these concerns.
Query 1 : Is there a way that I can detect this and
moreover, call a method to refresh the layout without having the user refresh
the whole page?
To achieve this requirement, we have utilized the Dashboard
Layout component's "created"
event. In the event handler, we can call the Dashboard Layout component's
"refresh" method. This ensures that the Dashboard Layout is
rendered properly without any layout issues.
Refer to the below code snippet for further reference.
[index.js]
var dashboard = new ej.layouts.DashboardLayout({
cellSpacing: [10, 10],
cellAspectRatio: 100 / 85,
columns:2,
....
created: OnCreated,
....
});
dashboard.appendTo('#defaultLayout');
....
function OnCreated(args){
document.getElementsByClassName('e-dashboardlayout')[0].ej2_instances[0].refresh();
}
|
Query 2 : Is there a way to have the panel scroll
whenever the content it too big to fit?
To achieve this requirement, we suggest you set the "overflow:
auto" style for the content tag. This will ensure that the
component rendered inside the panel gets a scrollbar when the height and width
exceed the available space.
In addition, we have attached a simple sample for your
reference.
Sample : https://stackblitz.com/edit/zfzf8f?file=index.js
Check out the shared details and get back to us if you need
any further assistance.
Regards,
Suresh.