Hello, is it possible to use global variables in Radzen Blazor Studio? Do you have examples on how to create global variables?
Thank you!
Kind regards
Hello, is it possible to use global variables in Radzen Blazor Studio? Do you have examples on how to create global variables?
Thank you!
Kind regards
Hi @d.kotou,
There is no such feature in Radzen Blazor Studio since the code of the page is generated during the page creation unlike Radzen where the code is generated on every run from the meta json. You can add however exactly the same code in your Bazor project using Radzen Blazor Studio - a service that will hold desired variable(s) registered on when app starts:
Later you can inject this service in desired page(s):
Hello,
I am attempting to implement globals while migrating a Radzen Studio app to RBS and have followed these instructions but my global variables are not returning values. For a simple example, I want to set a bool when the main layout loads that I can use for every other page in the app.
Here is my setup based on the original instructions:
To test, I set two switches to Globals.ShowInactive
:
But the variable does not seem to work because activating one switch does not effect the other:
Am I missing something?
Thanks,
Zach
Hi @Zach.E
Take a look at this example - RadzenSwitch
Looks like you need to assign to @bind-Value
instead of Value
.
Many regards
Paul
This is exactly what I needed. Thank you very much!