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
close icon

MinValue Validation Not firing in ej:Grid and form not submitting to server

Hi,

we are using SF Grid control on a page and for a particular column added the validation to enforce a minimum value as 10.  If we do not specify the Min Value validation the form's required validation works good. But if we specify the min value validation, then there is a JS error being thrown. I have enclosed the screenshot and the aspx file with and without validation rule in place. Kindly help us resolve the issue. 

<ej:Column Field="Taxamount" HeaderText="Taxamount" AllowEditing="True" EditType="Numeric" Format="{0:C}">
   <NumericEditOptions DecimalPlaces="2"></NumericEditOptions>
<ValidationRule>
<ej:KeyValue Key="required" Value="true"/>
<ej:KeyValue Key="min" Value="10"/>
</ValidationRule>
</ej:Column>

Attachment: SF_GridMinValidationIssue_14062017_92277abe.rar

3 Replies

JK Jayaprakash Kamaraj Syncfusion Team June 15, 2017 01:25 PM UTC

Hi Sathish, 

Thank you for contacting Syncfusion support. 

We have prepared a sample with your code example but we were unable to reproduce the issue at our end. Please share the following details to provide prompt solution to you, 

1.       Share your essential studio and browser version details. 
2.       Share SiteMaster and Webconfig page of your project. 

3.       An issue reproducing sample if possible or hosted link or replicate the issue in the attached sample 


Regards, 
Jayaprakash K. 



SA sathish June 16, 2017 12:27 PM UTC

Hi,

Thanks for the explaination. The sample app helped me identify the issue due to some wrong and old Jquery file reference. It has been fixed now and validations working good. On another note, is there anyway to stop the input panel for a grid for inline editing or template based edit form from closing as soon as the save button is clicked?. Because, once the inout is valid the save button click closes the form and submits to server side. But if there is a server side error, the entered fields are lost and we have to start afresh editing a record or adding a nre one. I thought it would be good to prevent the form from closing so we can force the form to appear and display any error messages right above the input fields and inside the edit form.


JK Jayaprakash Kamaraj Syncfusion Team June 19, 2017 12:00 PM UTC

Hi Sathish, 

While using server edit events in Grid edit form will be closed and changes doesn’t reflect when any error in server side. This is the default behavior of Grid. To overcome this problem, we suggest you to use WebmethodAdaptor or remotesaveAdaptor instead of server edit events to perform crud operation in server side. Please refer to the below help document and online demo sample. 



Online demo sample using WebMethodAdaptor: http://asp.syncfusion.com/demos/web/grid/webmethodadaptor.aspx 

Regards, 

Jayapraksh K. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon