@*When provide the Template inside another template, At these cases you must provide Context*@
<GridEditSettings AllowAdding="true" AllowDeleting="true" AllowEditing="true" Mode="EditMode.Dialog">
<Template>
@{
...
<SfGrid TValue="IndicatorValue"...>
...
<GridColumns>
<GridColumn Field="@nameof(IndicatorValue.IndicatorId)" ...>
<Template Context="GridInsideDialog">
@((context as IndicatorValue)?.Indicator?.ToString())
</Template>
</GridColumn>
</GridColumns>
<GridEditSettings AllowAdding="true" AllowDeleting="true" AllowEditing="true" />
</SfGrid>
</div>
</div>
</div>
}
</Template>
</GridEditSettings> |
<EditForm Model="@treatment">>
<SfGrid DataSource="@GridData" Toolbar="@(new string[] {"Add", "Edit" ,"Delete","Update","Cancel" })">
<GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="@EditMode.Dialog">
<Template Context="DialogContext">
@{
var Order = (DialogContext as OrdersDetails);
}
</Template>
</GridEditSettings>
</SfGrid>
</EditForm>
|