Blazor Grid: Validation of dropdown in template

When using a dialog template with a dropdown, how can we get the validation rule of required to work upon saving of the record?

<GridColumn Field=@nameof(EntityField.DataTypeId) HeaderText="Data type" Width="150" ValidationRules="@(new ValidationRules{ Required=true})"></GridColumn>

In this demo, can you please set OrdersDetails.ShipCountry  to required?
https://blazor.syncfusion.com/demos/datagrid/grid-dialog-template?theme=bootstrap4 

2 Replies 1 reply marked as answer

MC Mike Chafin September 12, 2020 12:58 PM UTC

I pulled the example and had no issue setting the ship city to required using either Annotation or ValidationRule on the grid column.




RN Rahul Narayanasamy Syncfusion Team September 14, 2020 04:56 AM UTC

Hi Scott/Mike, 
 
Greetings from Syncfusion. 
 
We have validated your query and you can set validation for any column by using ValidationRules or DataAnnotation. Find the below documentation for your reference. 
 
Reference: 
 
Please get back to us if you need further assistance. 
 
Regards, 
Rahul 
 


Marked as answer
Loader.
Up arrow icon