I have some oData coming back from the lastest ASP.NET web api that looks like this:
{ "odata.metadata":"http://mydomain/odata/$metadata#Users", "odata.count":"3", "value":[ {"FirstName":"Alan","MiddleName":"A.","LastName":"Arlington"}, {"FirstName":"Brad","MiddleName":"B.","LastName":"Boston"}, {"FirstName":"Dirk","MiddleName":"J.","LastName":"Watkins"} ] }
How can I bind this to the igCombo? Notice that the total record count has a dot in the property name. Also, how do I get the igCombo to stop looking for a root of "d"?
I've tried tons of stuff, including the below. Any ideas?
var usersDS = new $.ig.RemoteDataSource({ dataSource: '/odata/Users?', type: 'json', responseDataType: 'json', responseTotalRecCountKey: 'odata.count', responseDataKey: 'value', }); $('#combo').igCombo({ loadOnDemandSettings: { enabled: true, pageSize: 10 }, mode: 'readonlylist', dataSource: usersDS, filteringType: 'remote', width: '250px', textKey: 'LastName', valueKey: 'FirstName', virtualization: true, autoComplete: true, itemTemplate: '${FirstName} ${LastName}', nullText: 'Select an employee' });
hi,
I am just checking if the latest reply helped you out or you require any further assistance on the matter.
No, it does not work as the json data returned has "odata.count":"30" for ResponseTotalRecCountKey. The Combo can display data if I use .ResponseTotalRecCountKey("30") instead in the option.