- Home
- Forum
- ASP.NET MVC - EJ 2
- Initial size and message for empty dashboard
Initial size and message for empty dashboard
I'm looking for a way to limit the intitial size of the dashboard layout and maybe display a message when there are no panels.
Right now, when the dashboard is empty it takes pretty much the whole screen and hides the content underneath.
I've tried using the "Created" event to change the height manually when the "rows" property is empty but it is inmediately overwriten.
I've also tried to use the ":empty" css pseudo class but it doesn't work because the dashboard renders a white space.
Thanks in advance.
-Juan
SIGN IN To post a reply.
3 Replies
KR
Keerthana Rajendran
Syncfusion Team
November 8, 2019 08:50 AM UTC
Hi Juan,
Greetings from Syncfusion support.
We have checked your reported query to set the initial height of dashboard layout when there is no panel. We would like to let you know that when the panels count is zero, the dashboard layout will consider the rows values equal to columns values and render the layout which will be an empty layout. However, we can achieve your requirement to hide the dashboard element, by adding display CSS property value as none to the dashboard element in the created () event when the panel count is zero. Here you can add the display message based on your requirement.
Refer the below code snippet.
|
For your reference, we have prepared a sample with the above-mentioned solution and attached it below. Here, we have added a class to the dashboard layout element while panels count is zero and set display CSS property value none for the added class. Here , during button click we remove the class while a panel is added.
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/WebApplication1290120190.zip
Please let us know, if you have any concerns.
Regards,
Keerthana.
JJ
Juan Jiminez
November 8, 2019 05:11 PM UTC
Thanks Keerthana,
It works as expected, I just need to make sure you remove the class when I add panels.
KR
Keerthana Rajendran
Syncfusion Team
November 11, 2019 09:25 AM UTC
Hi Juan,
Most Welcome. Yes, you need to remove the hide class during addition of panel as mentioned in our previous update. Please let us know if you need further assistance on this.
Regards,
Keerthana.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
JJ Juan Jiminez
- Nov 7, 2019 11:53 PM UTC
- Nov 11, 2019 09:25 AM UTC