How to resize table in dashboard

We have a dashboard that has a single query. Unfortunately the table that is displayed appears to be fixed to the initial size of the window when the dashboard opens which is causing some issues for users who want to see more data at once and have the screen space to view all columns without needing scrollbars - when the window size is increased it just increases the blank space around the table.

How can I resize the table in the dashboard so it matches whatever size the window is? I could not find any properties under Dashboard and Dashboard Maintenance to change the size. In fact, the table size when I edit the dashboard does not even match the size of the window or table of the deployed dashboard - it is smaller! I also tried adding a customization on the deployed dashboard but I was only able to resize it to a larger fixed window, which was then completely ignored when I attached the customization to the menu item! (After clear the cache, restarting etc. even)

We received one suggestion to recreate the dashboard but when I try to do so I still don’t see any options for setting the table size to match whatever the window is, or for setting it to any size for that matter.

My typical solution to this is to create a customization layer and include this code:

private void MainController_Load(object sender, EventArgs args)
	{
		this.MainController.WindowState = FormWindowState.Maximized;
	}

This just grabs the window on load and maximizes it. Should solve your problem.

When you say customization “layer” you are referring to the same kind of customization I did, right? That is to say, attach a customization to the deployed dashboard? Or is the something different?

First, I would try recreating the dashboard, unless it is too complex, and see if that will solve your problem.

If it does not, you would want to customize the deployed dashboard, and find the parent or grandparent of the grid that is the right size, or stretches properly to the right size you want.

Once that is found, bind to the resize event of the parent/grandparent, and start resizing the children to match.

Yes that is correct.

Thanks!

1 Like

I started down this path as it’s a very simple dashboard, just one query… but I don’t see the point at which the window size is determined. Do I need to resize the window to where I want it at a certain point or is there some config somewhere I am missing?

Yes, you’ll need to stretch and resize before deployment.

Do you mean before deployment for the first time? I tried stretching it before a later deployment and couldn’t get it to work.

There’s the Set defaults menu option that is quite tricky to use but very important.

1 Like

Have you seen the thread:

If it looked right in preview, it should look right when deployed.

If you are going to customize, it’s usually best to customize the assembly after deployment.

Can you show us some pictures?

I just wanted to give an update as I had to put this on the back burner for a few days. I had started down the path of recreating the dashboard but had not yet deployed. When I went back to review the suggestions I noticed that the new dashboard already had the table size maximized, and when I deployed it retained that characteristic. So if I resize the window smaller than the table size it displays scrollbars to scroll around the table, but once the window size reaches the table size these go away, allowing the user to see the full extent of the table. I don’t recall doing anything special in creating the dashboard to set it up this way, so it appears that simply recreating the dashboard did fix the problem.
Thanks everybody for your help!

1 Like