This is a shot into the dark, I actually only understand your last sentence "I should be able to get the column name as well as the data" - and could imagine that if you bind a collection to a combobox (I don't know the DevExpress combobox extension) the combobox control wants a collection of class objects with a property name/property value pair instead of only a collection of values ( int
). So, without touching the AccountService
you could try:
public ActionResult ReferenceIdPartial()
{
ViewData["AccountOwners"] = accountOwnerService.GetAllReferenceIds()
.Select(i => new { ReferenceId = i });
return PartialView();
}
ViewData["AccountOwners"]
now would hold a collection of (anonymous) objects. Each object has one property called ReferenceId
with a value i
fetched from the Ids you returned from your service.