Validation not check to Edit Data

Dear Syncfusion 
i have develop one test Application this application use JS Control ejGrid this grid i use to Add,Update,Delete Operation but i face issues to Update data for checking validation rules .Add Data time Validation is perfect work but Update Record time not Check Validation Rule.

i have use render ejGrid using Templete funcation.
i have use Jquery validation 1.17 version


$(element).find('#Grid').ejGrid({
                        allowPaging: false,
                        allowSorting: true,
                        allowGrouping: false,
                        allowFiltering: true,
                        editSettings: {
                            allowEditing: true,
                            allowAdding: true,
                            allowDeleting: true,
                            showDeleteConfirmDialog: true,
                            titleColumn: "ZoneName",
                            editMode: "dialogtemplate",
                            dialogEditorTemplateID: "#template"
                        },
                        enableDropAreaAnimation: true,
                        scrollSettings: { width: '100%', height: 300 },
                        filterSettings: { filterType: "excel" },
                        dataSource: ej.DataManager({
                            url: ServiceURI + "api/Zone",
                            adaptor: "WebApiAdaptor",
                            crossDomain: true
                        }),
                        toolbarSettings: {
                            showToolbar: true,
                            toolbarItems: [
                                ej.Grid.ToolBarItems.Search,
                                ej.Grid.ToolBarItems.Add,
                                ej.Grid.ToolBarItems.Edit,
                                ej.Grid.ToolBarItems.Delete,
                                ej.Grid.ToolBarItems.Update,
                                ej.Grid.ToolBarItems.Cancel
                            ]
                        },
                        allowScrolling: true,
                        groupSettings: {
                            showToggleButton: true,
                            showUngroupButton: true
                        },
                        isResponsive: true,
                        enableResponsiveRow: true,
                        columns: [
                            { field: "ZoneID", isPrimaryKey: true, visible: false, headerText: "ZoneID" },
                {
                    field: "ZoneName",
                    headerText: "Zone",
                    validationRules: { required: true,message:"required" },
                    validationMessage: { required: "Required" }
                },
                { field: "ServerID", headerText: "Server", editType: ej.Grid.EditingType.Dropdown }
                        ],
                        toolbarClick: function (e) {
                        },
                        actionComplete: function (args) {
                            console.log(args);
                            if (args.requestType == "save" || args.requestType == "delete") {
                                var gridObj = $("#Grid").ejGrid("instance");
                                gridObj.refreshContent();
                            }
                            if (args.requestType == "beginedit") {
                                $("#ServerID").ejDropDownList({
                                    dataSource: scope.ServerList,
                                    text: args.rowData.ServerID
                                });
                                var gridObj = $("#Grid").data("ejGrid");
                                console.log(gridObj.editFormValidate());
                            }
                            if (args.requestType == "add") {
                                $("#ZoneID").prop("disabled", true);
                                $("#ServerID").ejDropDownList({
                                    dataSource: scope.ServerList,
                                    text: args.rowData.ServerID
                                });
                            }


                        },
                        actionBegin: function (args) {
                            //console.log(args.requestType);
                            console.log(args);
                        }
                    });

1 Reply

VN Vignesh Natarajan Syncfusion Team February 28, 2018 04:08 PM UTC

Hi Viral, 

Thanks for using Syncfusion products.  

Query: “Validation not check to Edit Data” 

We have analyzed your query and we have prepared sample using your code snippets. We are not able to reproduce the reported issue at our end.  

The sample can be downloaded from below link 


Kindly share the following detail to reproduce the reported issue form our side. 

1.       Share the full grid rendering code 
2.       Share the screenshot for the script error in console window (if any). 
3.       Try to reproduce the reported issue in provided sample. 
4.       Or share the issue reproducible sample. 

Regards, 
Vignesh Natarajan   


Loader.
Up arrow icon