Hello Radzen Dev Team!
There seems to be a problem with the context definition with many child entities.
Here is a simple example:
Parent table:
int: Id
int: Value
Child1
int Id
int ParentId (related to parent's Id)
Child 2
int Id
int ParentId (related to parent's Id)
The application does not compile and returns an error:
dotnet: Pages / Parent.razor (54,137): error CS0103: The name 'testModelsDataChild1' does not exist in the current context [/Users/domivan/Documents/Radzen/Test/server/Test.csproj]
I understand that the context always gets the value from the previous context used.
So, the second Add button in template belongs to the previous context from grid1
How to redefine the context for the second Add button so that it belongs to the parent context?
I understood. But this is not an option - my template is not one nested table, but an accordion with many items, nested tables, buttons, and so on.
Suggest manually write markup? And then why was the license purchased?
Just to add some words about the license. Radzen is complex tool and in rapidly changing environment like Angular and Blazor (several major versions in less than a year) there are chances something to not work properly. The license guarantees you that your case will be verified carefully, you will receive an answer (24h response time), we will offer you workaround and we will release fix for your problem usually in the same week.
Last fix 2.45.13 only partially solved the problem.
Now the context of the child elements belongs to the parent, but only if element is in the root of the template.
If the elements are placed in other containers (cards, accordion), then the value from the last used context is still taken.
2.46.0 Problem is not fixed, if the elements are placed in other containers (fieldset, cards, accordion etc), then the value from the last used context is still taken.