Get page parameters and set a property

Hello!

Just wanted to test some thing with getting parameters to the next page in blazor.

There is something like this line:
@page "/pagename/{parameter}"
in the razor file that gets a parameter. How can i generate this line in radzen?

How can i get this parameter and put it into an Text of a Label for example?
If i query ${parameters.paramname} i always get the message that "parameters" does not exist.

Did i miss anything? Thanks

You can check how the Edit page is using the parameter passed from RowSelect event of the DataGrid.

Yes i watched this in an edit-page.
On Page load i tried to set a property on Load event like this:


But it shows me an error that the parameter is not defined.

So i am quite shure i have missed defining the parameter - (That that will make the line @page "/pagename/{parameter}" appear) But i did not find any button or property setting where i need to define it in radzen :cold_sweat:

The DataGrid RowSelect in our CRUD pages will open Edit page as a dialog with parameter. When navigating to a page it will be the same. In this way you will have a page with parameter - the Edit page.

I'm realy sorry, but i do not get it. :fearful:

I also tried to rebuilt an edit-page by hand but i did not manage it - i alway get an error saying "The name 'parameters' does not exist in the current context"

What i do:

  • Add a new empty page
  • Add a label and in text-property enter "${parameters.testparam}" to display the parameter "testparam" to the page. (url with /page?testparam=something)
  • The label text is now "The name 'parameters' does not exist in the current context"

Do i need to enter the parameters somewere else in the page?

Thanks for the late help! Regards

Hi @chackl,

It seems we have a problem with the designer - it will be addressed immediately!

Add two pages: MainPage part of application navigation and DetailsPage excluded from navigation. We will open the details pages as dialog with parameter:


In the details page try accessing the parameter by name directly:

this will be fixed in the next version

and run the application:

Yes that is the way i did :slight_smile:

Thanks and hoping for a soon fix :slight_smile:

Hello radzenteam,
the parameter preview list while typing ${... doesnt work here. otherwise the app is working fine.

image



image

Im using Radzen 2.43.3

When we use these parameters in filters of Invoke data source metod the Handlers of Load Detail Page we have an error :
''A lambda expression cannot be used as an argument for a dynamically bound operation without first converting it into a delegate or expression tree type....''
Whether it These prameters cann't be used in filter equals of handler (invoke source metod) ?

I'm having a similar Issue, just want to check if this problem was solved, working with 2.69.2 version.