Inline Grid editing with Dropdown column

Hello,

How can we bind the data source into the dropdown in inline edit mode ?
My needs is, the column use property Mobil that on DeliveryOrderSchedule, when edit the dropdown comes from ViewData["lstMobil"] that use MobilId as value of dropdown and Description as text of dropdown.
When edit mode the Dropdown not showing any data even though the lstMobil have data.

Please see attached files to see my code and the screenshot of the 


Attachment: Syncfusion_7c4d28f9.zip

1 Reply

DM Dineshnarasimman Muthu Syncfusion Team January 28, 2026 10:22 AM UTC

Hi,


Greetings from Syncfusion Support.


We have reviewed your query and understand that you would like to assign a custom dataSource to the DropDownList during editing. We noticed that you have already provided the dataSource and fields configuration within the column.edit property. In addition to this, we recommend binding the query property as well with new Query().


Please ensure that the value and text fields defined in the fields configuration exactly match the corresponding key names in the provided dataSource. For your reference, we have included the corrected code snippet:


<e-grid-column field="Mobil"

       headerText="Mobil"

       width="220"

       editType="dropdownedit"

       foreignKeyField="MobilId"

       foreignKeyValue="Description"

       validationRules="@(new { required = true })"

       edit="@(new {

       @params = new {

          dataSource = (List<Mobil>)ViewData["lstMobil"],

          fields = new { value = "MobilId", text = "Description" },

          placeholder = "Pilih Mobil"

          query= new ej.data.Query()

          }

})">

 


We have also discussed this scenario in detail in our documentation regarding how to provide a custom dataSource for the edit DropDownList. You can refer to the link below:


Documentation: https://ej2.syncfusion.com/aspnetcore/documentation/grid/editing/edit-types#provide-custom-data-source-for-dropdownlist-component


Please get back to us for further assistance.


Regards,

Dineshnarasimman M


Loader.
Up arrow icon