Binding DropDownList to ODataV4

Hi support, i need to bind my ddl to  an OdataV4 remote service.

This is my Tag in cshtml file:

"
<ejs-dropdownlist id="title" ejs-for="People.TitleId" locale="it" >
     <e-data-manager crossDomain="true" url="http://localhost:5400/odata/Titles/?$count=true" adaptor="ODataV4Adaptor"
                     headers="new object[]{ new { Authorization = @token  } }"></e-data-manager>
    <e-dropdownlist-fields text="TitleAbbr" value="Id" id="Id"></e-dropdownlist-fields>
</ejs-dropdownlist>
"
and this one my action controller:

"
        public IQueryable<Titles> Get(ODataQueryOptions<Titles> options)
        {
            _logger.LogDebug("Start");


            result = options.ApplyTo(result, new ODataQuerySettings()) as IQueryable<Titles>;

            return result;
        }
"

Where i wrong ?

Thanks
Stefano

1 Reply

PO Prince Oliver Syncfusion Team July 6, 2018 02:34 PM UTC

Hi Stefano, 

Thank you for using Syncfusion products. 

We suspect that the issue might be due to url and header property not assigned properly. We have prepared a OdataV4 sample for DropDownList for your reference. Kindly refer to the following link for the sample: http://www.syncfusion.com/downloads/support/forum/138537/ze/OdataV4-1769727411 

Note: we have added the OdataV4 service and Dropdownlist in separate application 

Kindly refer to the above sample and let us know if you require any further assistance on this. 

Regards, 
Prince 


Loader.
Up arrow icon