Dashboard resizing issue

Hi, I have a refresh button that will refresh the Dashboard layout in order to resize the dashboard.

However, when I hit 'Refresh', the dashboard panels get smaller as there is more space on the right side of the dashboard.

I want the Dashboard to stay the same size when refreshing. Is there a way to do this? 

Thank you.      

'.razor'


Attachment: Dashboard_resizing_bug_ac74fc50.zip

4 Replies 1 reply marked as answer

SS Sharon Sanchez Selvaraj Syncfusion Team June 15, 2021 10:47 AM UTC

Hi Kenney, 
 
Thanks for contacting Syncfusion Support.  
 
We have checked with your provided code snippet and the video. We were able to reproduce the mentioned scenario and are currently validating with high priority. We will provide an update within three business days, by June 18th 2021. 
 
We appreciate your patience. 
 
Regards, 
 
Sharon Sanchez S. 
 
 
 



SS Sharon Sanchez Selvaraj Syncfusion Team June 18, 2021 12:59 PM UTC

Hi Kenney, 
 
Thanks for your patience. 
 
We would like to mention that, the required scenario occurs because the Dashboard Layout initially takes the entire width of the page and renders the panel. However, as we are using Sidebar in this case, we suggest you to invoke the Refresh method in the Created event of Dashboard Layout with a specific time delay. This helps in the proper alignment of panels based on the Sidebar’s width. 
 
Refer to the code snippet: 
 
public async void refresh() 
    { 
        await dashboardObject.Refresh(); 
    } 
    public async void created() 
    { 
        await Task.Delay(500); 
        await dashboardObject.Refresh(); 
    } 
 
Refer to the sample. 
 
 
Please get back to us if you need further assistance. 
 
Regards, 
 
Sharon Sanchez S. 
 



KP Kenney Phan June 18, 2021 06:19 PM UTC

Hi, thanks for getting back to me.

Your solution refreshes the dashboard and makes it smaller. Is there a way to refresh the dashboard to keep it at its largest size when it's first rendered?

Thank you


SS Sharon Sanchez Selvaraj Syncfusion Team June 21, 2021 11:51 AM UTC

Hi Kenney, 
 
We would suggest you to set the proper sizeX and sizeY values for the panels. The sizeX and sizeY values are used to determine the panel’s size(width and height). These values are split based upon the number of columns provided in the application. You can update these values based on your requirement. 
 
Refer to the below links for more details on these properties. 
 
 
 
 
As mentioned earlier, the proper size will be set for Dashboard panels only when the Refresh method is invoked with respect to the Sidebar's specific width. 
 
Please get back to us if you need further assistance. 
 
Regards, 
 
Sharon Sanchez S. 


Marked as answer
Loader.
Up arrow icon