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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

how to change dropdown datasource while editing

Platform: jQuery |
Control: ejGrid |
Published Date: March 1, 2017 |
Last Revised Date: March 1, 2017
Tags: asp, javascript, mvc

How to change the dropdown data source while editing?

We can change the Dropdown data source while editing the Grid instead of default data source. This can be achieved by using actionComplete event in Grid. The following code example demonstrates how to change the dropdown data source while editing.








actionComplete event


The following screenshot display the new Dropdown data source while editing the Grid.

Figure 1: Output

You must log in to leave a comment
William Miller
Aug 02, 2018

This gets me 90% of the way there but then you use "$("#GridEmployeeID")".  Where does GridEmployeeID come from?  Is this something that Syncfusion creates?  If so then how are we supposed to know what the drop-down-list will be named?

Alan Sangeeth S [Syncfusion]
Aug 02, 2018

Hi William,

 "$("#GridEmployeeID")". is the id dropdown element which is the combination of Grid id and column field name.

Alan Sangeeth S

Srinivas Kolluru
Dec 18, 2018

Hello Alan,

I tried the below code in my Razor view and i am unable to see the Dropdown values for the cloumn in the grid. can you please suggest any change to make it work.










                    .EditSettings(edit => { edit.AllowEditing(); })


                    .Columns(col =>



                          col.Width("275px").Field("PlanLevelName").HeaderText("Plan Level").HeaderTextAlign(TextAlign.Center).EditType(EditingType.Dropdown).Add();




Srinivas Kolluru
Dec 18, 2018

I am not sure why the HTML tags lost. here is the scriptblock i used

Srinivas Kolluru
Dec 18, 2018

    function actionComplete(args) {

            //while editing the grid

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

                //New Dropdown data source and here text is display purpose and values is saved to data base.

                var dpDataSource = [{ value: 1, text: 'WOS' }, { value: 2, text: 'TopDown' }, ];

                $("#GridPlanLevelName").ejDropDownList({ dataSource: dpDataSource, selectedIndex: 1 }); //Set the new Dropdown datasource




Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile
Live Chat Icon