aspnetcore-405169-troubleshooting-drop-down-editor-does-not-show-data.md
This section describes what you can do if the following drop-down editors display an empty edit box or empty drop-down list:
Follow the steps below to troubleshoot your application. If the solutions listed here do not help, create a ticket in our Support Center and describe your issue in more detail: Create a ticket.
If you specify a DataSource for a drop-down editor, the store.key value and the drop-down editor’s valueExpr should be the same. In the following code snippet, the ID is used as both key and valueExpr. This rule applies to standalone editors and Data Grid/Tree List lookup column editors.
.Lookup(lookup => lookup
.DataSource(d => d.Mvc().Controller(controllerName).LoadAction("ActionName").Key("ID"))
.ValueExpr("ID")
)
If you use a lookup column editor in the Data Grid or Tree List, you need to specify the columns.dataField property. The value of that field should match the values in lookup.valueExpr. In the code below, the StateID and ID fields should store the same keys and have the same type (for example, String).
columns.AddFor(m => m.StateID)
.Lookup(lookup => lookup
.DataSource(d => d.Mvc().Controller(controllerName).LoadAction("ActionName").Key("ID"))
.ValueExpr("ID")
)
If you call the DevExtreme.AspNet.Data.createStore() method to bind a standalone editor or Data Grid/Tree List lookup column, the editor expects all data operations (including value selection) to be performed on the server. Use the DevExtreme.AspNet.Data library to obtain correct data in the Controller for .NET-based applications.
Examine your network requests to learn which loadOptions parameters you need to specify. In the following example, the parameter is filter.
Alternatively, set the createStore().loadMode option to raw to process data on a client.