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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Struggling with the doc

Thread ID:

Created:

Updated:

Platform:

Replies:

126261 Oct 4,2016 04:12 PM UTC Oct 5,2016 06:26 AM UTC JavaScript 1
loading
Tags: ejGrid
Michael Baas
Asked On October 4, 2016 04:12 PM UTC

I'm trying to do seemingly "basic" things,  but your doc and I are having problems :(

For example, I'm trying to define a column where the cells are supposed to be integer values in the range of -2 to +2.
What should editType be?  This piece of doc suggests using ej.Grid.EditingType.NumericTextBox, whereas the example on the same pages uses editType: "numericedit". numericedit actually comes with a spinner, so it happens to be what I needed - not the "NumericTextBox". But I wonder why your information is organised in such a chaotic way. Or perhaps I did not understand the principles of your doc and was looking at the false places anyway?

I would appreciate a guiding hand to avoid such confusion in the future :-)



Prasanna Kumar Viswanathan [Syncfusion]
Replied On October 5, 2016 06:26 AM UTC

Hi Michael, 

Thanks for contacting Syncfusion support. 

We suspect that you are expecting validation for the particular column which supposed to be have integer values in the range -2 to 2. If you want validation before saving the record, define the validationRules property in the columns. 

In this sample we used range as jQuery validation method to achieve the requirement. 

Find the code example and sample: 


$(function () { 
            $("#Grid").ejGrid({ 
                // the datasource "window.gridData" is referred from jsondata.min.js 
                ----------------------- 
                allowPaging: true, 
                editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true }, 
                ------------------------ 
                columns: [ 
                         --------------------- 
                        { field: "Freight", headerText: 'Freight', textAlign: ej.TextAlign.Right, validationRules: { number: true, range: [-2, 2] }, width: 80 }, 
                         ----------------------- 
                ] 
            }); 
        });   
    
  

Refer to the Help document 



Note: The below validation script files are needed when editing is enabled with validation. 

1. jquery.validate.min.js 

2. jquery.validate.unobtrusive.min.js 

Regards, 
Prasanna Kumar N.S.V 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;