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

Modify drop-down cells in the grid

When modifying a drop-down cell in the grid, I hope that the value of the drop-down is selected and the cell save is made immediately.

Currently, when you finish modifying the cell, you need to click somewhere else to end the modification mode, which is unnecessary.

I want the edit mode to be released at the same time as selecting the value of the drop-down.

Please tell me how to end the modification mode at the same time as selecting the value.

 


Attachment: DropEdit_1f3e67fa.zip

1 Reply

VB Vinitha Balasubramanian Syncfusion Team February 24, 2023 03:17 PM UTC

Hi TaeWook,


Greetings from Syncfusion support.


Query: Modify drop-down cells in the grid


From your query, we understand that you want to save the dropdown cell immediately after selecting the dropdown value. You can achieve your requirement using saveCell method of grid in the change event of dropdown component.


new ej.dropdowns.DropDownList({

                        dataSource: country,

                        fields: { value: 'countryId', text: 'countryName' },

                        change: function(){

                            var grid = document.getElementById("Grid").ej2_instances[0];

                            grid.saveCell();           // saveCell method   

                        },

                        placeholder: 'Select a country',

                        floatLabelType: 'Never'

                    });


Please refer the attached sample.


Regards,

Vinitha Balasubramanian.

If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.


Attachment: core_demo_saveCell_467dd778.zip

Loader.
Up arrow icon