Inline Editing on Dynamic Grid

Hi @roycroftcr1,

Indeed the built-in Blazor editing and validation relies on @bind-Value which does not support array access expressions. A possible workaround is to use the Value property and the Change event of the components. Something like:

<RadzenDataGridColumn TItem="IDictionary<string, object>" Title="@column.Key" Type="column.Value"
    Property="@GetColumnPropertyExpression(column.Key, column.Value)" >
     <Template>
         @context[@column.Key]
    </Template>
     <EditTemplate>
          <RadzenTextBox Value=@context[@column.Key] 
            Change=@(value => @context[@column.Key] = value)  />
     </EditTemplate>
</RadzenDataGridColumn>

Validation won't work in this case though. Also full disclosure - I haven't tested that.

1 Like