Is there a way to use foreign key?
for example I have a "code" in a column and I want to display the corresponding description.
Regards
HI Michel,
I am not sure that I understand your requirement correctly.
Do you want for a specific value to extract and display another value in the cell element ? If so, you can use formatter input of the igx-grid. The formatter input is a function that gets the cell value as a parameter and returns another value:
Here is a basic example for formatting date:
this.column.formatter = (val: Date) => { return new Intl.DateTimeFormat("en-US").format(val);
Please let me know if you have further questions, I will be glad to help.
Thanks Hristo for you reply.
ForeignKey is used in KendoGrid for column binding
columns.ForeignKey(model => model.CODE_LFB1, (System.Collections.IEnumerable)ViewBag.arChoice1, "CODE_LFB", "LABEL_LFB")
for displaying "LABEL_LFB" instead of the Code "CODE_LFB1"
By the way, thanks for your suggestion. I will try to use it, it seems to be not far from what I want.
Thanks.
Hi Michel,
Yes, you should be able to achieve the same result (displaying a friendly text instead of the actual value) using the formatter. Please let me know if you have further questions.