What Radzen Blazor component will be best fit to edit IDictionary<string, string>?

I am looking for a best Blazor component to edit one of the property whose type is IDictionary<string, string>. Any suggestion?

Hi @Yongkee_Cho,

I don't think there is a component that would edit an IDictionary. What are your expectations?

Something like PropertyGrid in WinForms?

Yes, a PropertyGrid could work however Radzen.Blazor doesn't include such a component for the time being. Maybe iterating over the KeyValuePair entries and creating a form would be the best:

<RadzenTemplateForm TItem="IDictionary<string, string>" Data="dictionary">
@foreach (var keyValuePair in dictionary)
     <RadzenLabel Text="@keyValuePair.Key" />
     <RadzenTextBox Value="@keyValuePair.Value"
          Change=@(value => dictionary[keyValuePair.Value] = value) />
1 Like

Thank you @korchev !