Devextreme-angular: Cell Customization of DataGrid in Angular 2

Created on 13 Jul 2016  路  4Comments  路  Source: DevExpress/devextreme-angular

Hello,
How we can achieve cell customization in Angular 2 as given for angular 1 in link below:
http://js.devexpress.com/Demos/WidgetsGallery/#demo/data_grid-templates-cell_customization/angular
Kindly provide some demo/example for angular2 cell customization in dataGrid.

Regards,
Ali

bug duplicate

Most helpful comment

Hello Muhammad,

If I understand you right, you'd like to use the 'onCellPrepared' event to customize dxDataGrid cells. I've just checked it and confirm that this event is not raised. It seems to be a duplicate of聽#14. We'll check it once it's fixed.

To subscribe to this event, you can use Angular 2 event bindings:

  <dx-data-grid (onCellPrepared)="onCellPrepared" ...></dx-data-grid>

and declare a handler in your TS file:

  onCellPrepared(e) {
    ...
  }

All 4 comments

Hello Muhammad,

If I understand you right, you'd like to use the 'onCellPrepared' event to customize dxDataGrid cells. I've just checked it and confirm that this event is not raised. It seems to be a duplicate of聽#14. We'll check it once it's fixed.

To subscribe to this event, you can use Angular 2 event bindings:

  <dx-data-grid (onCellPrepared)="onCellPrepared" ...></dx-data-grid>

and declare a handler in your TS file:

  onCellPrepared(e) {
    ...
  }

Hi, I'm currently trying to subscribe to the onRowClick event of the dx-data-grid, the event fires but I don't get an event object (which I need to dig out some row-data), this is what I use:

<dx-data-grid ... (onRowClick)="taskGridRowClicked()" ...></dx-data-grid>

and in my ts file:

taskGridRowClicked(e) {
  ...
}

What am i getting wrong here?
Thanks.

Regards
Andreas

You need to use the $event value as follows:

<dx-data-grid ... (onRowClick)="taskGridRowClicked($event)" ...></dx-data-grid>

Duplicate of #14

Was this page helpful?
0 / 5 - 0 ratings