devextreme-angular icon indicating copy to clipboard operation
devextreme-angular copied to clipboard

DxDataGrid CellTemplate

Open Angelminster opened this issue 10 years ago • 3 comments

How can i use DxTemplate to customize cellTemplate in dxDataGrid?

Before:

<div data-options="dxTemplate:{ name:'buttonDeleteCellTemplate' }">
    <div dx-button="{bindingOptions: {onClick: 'vm.buttonClicked'}, 'text': 'Delete'}"></div>
</div>

in Column: { dataField: 'whatever', dataType: 'string', caption: 'superCaption' cellTemplate: 'buttonDeleteCellTemplate' }

Now?

Angelminster avatar Jun 27 '16 21:06 Angelminster

Hi,

Thank you for pointing out this case. It appears to be a bug. We suppose it should work as follows:

    <div *dxTemplate="let cellData = data of 'buttonDeleteCellTemplate'">
        <div dx-button (onClick)="buttonClicked()" text="Delete"></div>
    </div>

dxbykov avatar Jun 28 '16 12:06 dxbykov

Hi, so am I getting this right, are cellTemplates currently not working with devextreme-angular2 in dx-data-grid?

staran avatar Jul 20 '16 08:07 staran

Hi staran,

You are right. We'll fix this issue and publish an update soon.

dxbykov avatar Jul 20 '16 09:07 dxbykov