File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
projects/igniteui-angular/src/lib/grids Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -388,9 +388,22 @@ export class IgxColumnComponent implements AfterContentInit {
388
388
return this . grid . columns . indexOf ( this ) ;
389
389
}
390
390
/**
391
- * Gets formatter for the column.
391
+ * When autogenerating columns, the formatter is used to format the display of the column data
392
+ * without modifying the underlying bound values.
393
+ *
394
+ * In this example, we check to see if the column name is Salary, and then provide a method as the column formatter
395
+ * to format the value into a currency string.
396
+ *
392
397
* ```typescript
393
- * let columnFormatter = this.column.formatter;
398
+ * onColumnInit(column: IgxColumnComponent) {
399
+ * if (column.field == "Salary") {
400
+ * column.formatter = (salary => this.format(salary));
401
+ * }
402
+ * }
403
+ *
404
+ * format(value: number) : string {
405
+ * return formatCurrency(value, "en-us", "$");
406
+ * }
394
407
* ```
395
408
* @memberof IgxColumnComponent
396
409
*/
You can’t perform that action at this time.
0 commit comments