I'm trying to add RequiredValidator
to a Grid that support inline editing. I have the following code.But the validation is not working when i press the submit button.
<RadzenDataGrid TItem="WrapperClass"
Data="@portfolioWrapper.WrapperClass"
AllowPaging="true"
PageSize="2"
Count="@accountCount"
AllowSorting="false"
AllowColumnResize="false">
<Columns>
<RadzenDataGridColumn TItem="WrapperClass" Title="Portfolio">
<Template Context="data">
<RadzenTextBox Class="w-100" @bind-Value="@data.orgCode" Name="bl-scode" />
<RadzenRequiredValidator Text="Portfolio is required" Component="bl-scode" Popup="true" />
</Template>
</RadzenDataGridColumn>
<RadzenDataGridColumn TItem="WrapperClass" Title="Weight">
<Template Context="data">
<RadzenNumeric Class="w-100" @bind-Value="@data.ImportPercentage" Name="impperct" />
</Template>
</RadzenDataGridColumn>
<RadzenDataGridColumn TItem="WrapperClass">
<Template Context="data">
<RadzenButton Icon="delete" Size="ButtonSize.Small" Click="@(args => RemoveWrapperClass(data))" >
</RadzenButton>
</Template>
</RadzenDataGridColumn>
</Columns>
</RadzenDataGrid>
This grid is within RadzenTemplateForm