We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Disable edit template validation


how to disble form validation for the edit template ?

we have a grid with dialog edit mode and a template. this template contain multiple inputs that bind non-model data - editing this data cause an javascript exception to be thrown

Uncaught (in promise) Error: System.ArgumentException: The type 'EditMap' does not contain a public property named '_scale'. (Parameter 'propertyName')
   at System.ComponentModel.DataAnnotations.ValidationAttributeStore.TypeStoreItem.GetPropertyStoreItem(String propertyName)
   at System.ComponentModel.DataAnnotations.ValidationAttributeStore.GetPropertyType(ValidationContex validationContext)
   at System.ComponentModel.DataAnnotations.Validator.TryValidateProperty(Object value, ValidationContext validationContext, ICollection`1 validationResults)
   at Syncfusion.Blazor.Grids.Internal.Editors.ColumnsValidator`1.DataAnnotationHandler(FieldIdentifier identifier)
   at Syncfusion.Blazor.Grids.Internal.Editors.ColumnsValidator`1.ValidateField(Object editContext, FieldChangedEventArgs fieldChangedEventArgs)
   at Microsoft.AspNetCore.Components.Forms.EditContext.NotifyFieldChanged(FieldIdentifier& fieldIdentifier)
   at Syncfusion.Blazor.Inputs.SfInputTextBase`1.set_InputTextValue(TValue value)
   at Syncfusion.Blazor.Inputs.SfNumericTextBox`1.ChangeValue(TValue value)
   at Syncfusion.Blazor.Inputs.SfNumericTextBox`1.Action(String action, EventArgs args, String currentInputValue)
   at Syncfusion.Blazor.Inputs.SfNumericTextBox`1.ServerAction(String action, EventArgs args, String currentInputValue)

1 Reply

BL Balamurugan Lakshmanan Syncfusion Team May 4, 2023 03:51 PM UTC

Hi Christoph,

Greeting from Syncfusion Support.

Query: "how to disble form validation for the edit template ?"

We understand that you want to disable the Grid validation for the edit Template. Validation rules will be enabled in Grid only when we define the ValidationRules in GridColumn. So if you do not want to display validation. Kindly ignore that property (ValidationRules) from GridColumn. If not kindly share more details about your requirement.  

Please get back to us if you have further queries.



Live Chat Icon For mobile
Up arrow icon