Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
215
Foreign key in Angular grid
posted

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

Parents
  • 16310
    Offline posted

    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.

Reply Children