This guide demonstrates how to handle page and component events in Radzen.
Events represent things that have taken place - for example an application page is loaded, the user clicks a button or selects a dropdown item.
Pages have only one event - that is the Load event. The page events are visible in the property grid every time the developer opens a page in design-time. One can bring them back later by clicking in an empty page area or via the component picker at the top of the property grid.
Component events appear when you:
To handle events in Radzen you should add one or more actions to the specified event. To do so click the edit icon next to the name of the event. This opens the edit handler dialog where you can add, remove and update actions.
Actions execute in the order they are specified. You can change the order of execution by moving the actions up or down.
The following actions are available:
Makes an HTTP request to the URL that represents the data source method. Optionally pass parameters. Triggers two events - Then and Error.
Important! You must add an action for at least the Then event to handle the response. Otherwise the HTTP request will not happen.
Navigates to the specified page with the specified parameters.
parameterspage property. You can define unlimited number of parameters for the selected page navigate and you can specify Name and Value for each parameter where Value can be constant or expression.
Navigates to the previous page.
Opens the specified page in a modal dialog.
parameterspage property. You can define unlimited number of parameters for the selected dialog open and you can specify Name and Value for each parameter where Value can be constant or expression.
Displays the specified type of notification at runtime.
Sets the specified property to the specified value. The value should be a constant or expression.
Actions normally execute unconditionally.
To change that you can specify a condition. The action will execute only if the condition evaluates to
Sign-up to download the free 30-day Radzen trial.