One of the ways to solve the problem is to use ForeignKey.
However, yet another problem. I need dropdown to be custimozed — to have a filter search in it. As i believe, it is impossible to implement filter search without initializing a real ej-dropdown object. So, I've tried editTemplate, here's my implementation:
<e-column field="replacedUserId" enableFilterSearch="true" foreignKeyField="value" foreignKeyValue="text" [dataSource]="users" headerText="User"
[editTemplate]="{'create':'replacedDropCreate',read':'replacedDropRead', 'write':'replacedDropWrite'}">
And functions:
replacedDropCreate(){
return $("<input>")
}
replacedDropRead(args) {
return args.ejDropDownList("getSelectedValue")
}
replacedDropWrite(args) {
args.element.ejDropDownList({ width: "100%", dataSource: this.users, fields: { text: "text", value: "value" }, selectedItemIndex:0 });
}
Based on debug tools, none of the functions fired once. As the [editTemplate] property starts throwing errors when the syntax is wrong, i assume, that the general implementation is correct, but for some reason the functions are not recognized. Can you advise what is wrong in here?