There was some talk of this being implemented, but I can no longer find the forum thread or anything else that I was reading last time I looked into this.
I know how to pass parameters to my controls that I use in a Radzen Dialog but are able to pass in call backs yet?
For example in the following code:
My Dialog component has an "Action" parameter that can be called to notify the parent when the operation performed in the dialog is complete.
As you can see, I'm trying to attach the handler but the compiler is not amused.
Any Advice, Team Radzen?
Maybe you can use OpenAsync which will return result:
var result = await DialogService.OpenAsync("Simple Dialog", ds => ...
Otherwise you can use OnClose event of the DialogService together with Open() method.
Ah good catch @enchev I forgot about the OnClose handler...
I'll look at that route
I did resolve this once before, but the links I was looking at on here are no where to be found now.
Just out of interest however, are there still plans to allow Action parameters to be passed into the Radzen Dialog component?
Like a callback for close? Yep, we can add this!
As I say, I do remember reading in here once over that your team was thinking of adding this feature, may have been on the road-map document or somewhere.
I'm sure I can speak for a lot of people when I say that it would be a welcome addition to the DialogService/Component.
PS: I've solved my problem using a return variable on an async call for now.
This is actually a limitation of .NET / C# - you can add a method to a Dictionary (which is what the dialog parameters argument is). You can try this instead:
"SuccessCallback": () => Foo()
will give that a go tomorrow @korchev tks.. work ended for today now