let cTemp = function() {
return {
template: Vue.component("columnTemplate", {
template: `<a rel='nofollow' href="#">{{CustomerID}}</a>`,
data: function() {
return {
data: {}
};
},
computed: {
CustomerID: function() {
return this.data.assignee.name;
}
}
})
};
};
export default {
data() {
return {
formatoptions: { type: "dateTime", format: "M/d/y hh:mm:ss ss" },
data: nested,
isInitial: false
};
},
methods: {
dataBound: function() {
var gridObj = document.getElementsByClassName("e-grid")[0]
.ej2_instances[0];
let tempCol = gridObj.getColumnByField("assignee.name");
tempCol.template = cTemp;
tempCol.templateFn = templateCompiler(cTemp);
if (this.isInitial) {
gridObj.refreshColumns();
this.isInitial = false;
}
},
onLoad: function() {
this.isInitial = true;
}
},
provide: {
grid: [Filter, Page]
}
};
|