Required validation message not disappearing for dropdownedit field after selecting the value

    <script type="text/javascript">

        $(function () {


            var location = [

                { locationName: 'CITY', locationId: '1' },

                { locationName: 'REMOTE', locationId: '2' }

            ];

            var dataManager = ej.DataManager({

                url: "/api/Sites",

                adaptor: new ej.WebApiAdaptor(),

                offline: true

            });


            dataManager.ready.done(function (e) {

                $("#Grid").ejGrid({

                    dataSource: ej.DataManager({

                        json: e.result,

                        adaptor: new ej.remoteSaveAdaptor(),

                        insertUrl: "/api/Sites/Insert",

                        updateUrl: "/api/Sites/Update",

                        removeUrl: "/api/Sites/Remove",

                    }),

                    toolbarSettings: {

                        showToolbar: true,

                        toolbarItems: ["add", "edit", "delete", "update", "cancel", "search", "printGrid"]

                    },

                    editSettings: {

                        allowEditing: true,

                        allowAdding: true,

                        allowDeleting: true,

                        showDeleteConfirmDialog: true,

                        editMode: "dialog"

                    },

                    isResponsive: true,

                    enableResponsiveRow: true,

                    allowSorting: true,

                    allowSearching: true,

                    allowFiltering: true,

                    filterSettings: {

                        filterType: "excel",

                        maxFilterChoices: 100,

                        enableCaseSensitivity: false

                    },

                    allowPaging: true,

                    pageSettings: { pageSize: 10, printMode: ej.Grid.PrintMode.CurrentPage },

                    columns: [

                        { field: "FS_ID", headerText: 'FS ID', isPrimaryKey: true, defaultValue: '0', visible: false },

                        { field: "FS_NAME", headerText: 'Site Name', validationRules: { required: true } },

                        { field: "LOCATION_TYPE", headerText: 'Site Type', editType: 'dropdownedit', edit: { params: { value: location } }, validationRules: { required: true } },

                    ],

                    actionComplete: "complete",

                    /* actionBegin: "Begin",*/


                });

            });



        });




        function complete(args) {

            if (args.requestType == 'beginedit') {

                $("#" + this._id + "_dialogEdit").ejDialog({ title: "Edit Record" });


            }


    </script>



3 Replies

PS Pon Selva Jeganathan Syncfusion Team September 20, 2021 09:41 AM UTC

Hi Navamy 
   
Thanks for contacting syncfusion forum. 
 
Query: Required validation message not disappearing for dropdownedit field after selecting the value 
 
We checked your query by preparing sample based on your code snippet. We are able to reproduce the issue at our end.  We suggest you use the validation rules using validationRules property of columns instead of using edit parameter of the column. 
 
Please refer to the below sample, 
  
Please refer to the below help documentation. 
 
Kindly get back to us for further assistance.  
  
Regards, 
Pon selva 




NR Navamy Rajeev October 4, 2021 06:43 AM UTC

Hi Pon selva,


Even in the sample link provided by you, I am getting the same issue.



Also as you can see i am using validationRules property of columns :

{ field: "LOCATION_TYPE", headerText: 'Site Type', editType: 'dropdownedit', edit: { params: { value: location } }, validationRules: { required: true } }


Regards,

Navamy



PS Pon Selva Jeganathan Syncfusion Team October 5, 2021 12:19 PM UTC

Hi Navamy 
   
Thanks for the update. 
 
We have already discussed the same in following knowledge base document.   
  
Please refer the below KB documentation :   
   
 

Kindly get back to us for further assistance.

 
Regards, 
Pon selva 
 
 


Loader.
Up arrow icon