Dynamic Widget

Is it possible to make widget dynamic in size ? If can, how to do it ?
For example, if the grid only consists of 3 data, the widget become smaller. But if the grid consists of 10 data, then the widget become higher.

🚀 Scriptcase 9.12 is now available! Check out the new features here 👉🚀 Next Monday (02/24), Scriptcase 9.12 will be released! Check out the new features before anyone else 👉