Hi Erick,
Greetings from Syncfusion.
Query: In version 18.2.46, when using a dropdown component inside a grid column, the validationrules message is showing despite having a value populated in fields.
We have validated your query and checked the reported problem at our end. You can resolve the reported problem by providing @bind-Value to SfDropdownlist. Find the below code snippets for your reference.
|
<SfGrid AllowPaging="true" DataSource="@Orders" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })"> <GridEditSettings AllowEditing="true" AllowDeleting="true" AllowAdding="true" Mode="@EditMode.Dialog"></GridEditSettings> <GridColumns> <GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" ValidationRules="@(new ValidationRules{ Required=true})" IsPrimaryKey="true" TextAlign="@TextAlign.Center" Width="140"></GridColumn> <GridColumn Field=@nameof(Order.CustomerID) HeaderText="Customer Name" Width="150" EditType="EditType.DropDownEdit" ValidationRules="@(new ValidationRules{ Required=true})"> <Template> . . . </Template> <EditTemplate> <SfDropDownList ID="CustomerID" @ref="AutoCompletObj" TValue="string" @bind-Value="@((context as Order).CustomerID)" TItem="Order"> <SfDataManager AdaptorInstance="@typeof(CustomAdaptor)" Adaptor="Adaptors.CustomAdaptor"></SfDataManager> <DropDownListFieldSettings Value="CustomerID"></DropDownListFieldSettings> </SfDropDownList> </EditTemplate> </GridColumn> . . . </GridColumns></SfGrid>
|
Please get back to us if you need further assistance.
Regards,
Rahul