Hi Dave,
Thanks for using Syncfusion products.
We have analyzed the attached sample and we would like to let you that it is not feasible to bind array value in columns using foreign key. But we can achieve your requirement with the column template feature of the grid.
Please refer the below code snippet.
//Helper function
function arrayMatch(){
var fullData = this.data.arrayOfIDs, res = [];
staticMappedData.filter(function(data){
if($.inArray(data.ID,fullData) != -1){
res.push(data.value);
}
});
return res.join(",");
}
$(document).ready(function () {
//Registering helper
$.views.helpers({ DisplayArray: arrayMatch});
$("#grid").ejGrid({
dataSource: tableData,
columns: [
{ field: "someGUID" },
{ field: "someProperty" },
{
field: "arrayOfIDs",
//Defining the template of the column
template: "{{:~DisplayArray()}}"
}
]
});
}); |
For you convenience, we have modified the attached sample with the above code snippet and the same can be downloaded from the below location.
Sample Location: http://www.syncfusion.com/downloads/support/directtrac/118264/arraybinding1771230755.zip
For your kind information, we cannot perform grid actions such as sorting, filtering, grouping etc on template column.
Please let us know if you have any queries.
Regards,
Madhu Sudhanan. P