Pass Variable Back from Dialog

I am looking for how to pass info back from a dialog to the page. I'm trying to replace a form that we created using the website, and on that form, there is one section where we are accepting three strings to represent a prescription (drug name, Rx number, doctor name). The user can click an add button and it will add another row, to add another Rx, and it appears like three new textboxes (with labels).

The closest I have been able to figure out in Radzen is to use a DataGrid instead of three textboxes, because I haven't found a way to add the three textboxes. Using the Add button, I've created another form to open as dialog, and in that form, I've added the three textboxes representing the three bits of data we need, but don't see how to pass those three strings back (as an object, preferrably) to the original page.

Do you have any suggestions?

At this point, I'm no longer wondering how to do this. I'm now wondering if it is even possible given the severe limitations of Radzen to pass from a dialog back to the calling page. It seems quite difficult to fathom not being able to do so, but I'm sure not seeing a way.

I had a similar problem. The main window is composed of a DataGrid, when the user clicks a button it opens up a dialog with all the columns of the DataGrid in the parent window and the user selects with a checkbox which ones to show. This may give you an idea.

  1. Set a variable called visibleColumns with a value of {Column1: true, Column2: false, ...}.

  2. On the Click method of the button I open the dialog, and pass the whole variable containing the columns visibility status visibleColumns.

  3. I set up the array of checkboxes and set their Value property to their corresponding one of the passed parameter variable like so: ${parameters.visibleColumns.Column1}.

  4. Finally, I set the Visible property of each of the DataGrid columns to ${visibleColumns.Column1}.

When I click any of the checkboxes in the dialog, the corresponding column in the DataGrid on the parent page gets automatically hidden/shown.

Did you check this section from the documentation? It shows how to return a result from a dialog.