when you are using this kind of declaration for foreign key then it will not work and ViewBag.DataSource is not working in my scenario as you showed in attached sample.
function load(args) {
var fdata = loadForeignKeyData();
this.getColumns()[7].dataSource = fdata;
}
function loadForeignKeyData(){
var data = new ej.data.DataManager({
url: '/Controller/Action',
adaptor: new ej.data.WebApiAdaptor,
offline: true
});
return data;
}
if i declare like this then there will be no suggestion