Angular 6 DataGrid Devextreme:如何自定义删除行的弹出窗口

时间:2018-09-07 17:14:28

标签: javascript angular devexpress devextreme devextreme-angular

在Angular 6应用程序中,我正在使用 DevExtreme DataGrid 小部件。

这是我的实现:

<dx-data-grid 
    id="gridContainer"
    [dataSource]="dataSource"
    keyExpr="ID"
    [allowColumnReordering]="true"
    [showBorders]="true"
    (onEditingStart)="logEvent('EditingStart')"
    (onInitNewRow)="logEvent('InitNewRow')"
    (onRowInserting)="logEvent('RowInserting')"
    (onRowInserted)="logEvent('RowInserted')"
    (onRowUpdating)="logEvent('RowUpdating')"
    (onRowUpdated)="logEvent('RowUpdated')"
    (onRowRemoving)="logEvent('RowRemoving')"
    (onRowRemoved)="logEvent('RowRemoved')">

    <dxo-paging [enabled]="true"></dxo-paging>
    <dxo-editing 
         mode="row"
         [allowUpdating]="true"
         [allowDeleting]="true"
         [allowAdding]="true">
        <dxo-popup
                title="Employee Info"
                [showTitle]="true"
                [width]="1300"
                [height]="345"
                [position]="{ my: 'top', at: 'top', of: window }">
            </dxo-popup>
    </dxo-editing>

    <dxi-column dataField="Prefix" caption="Title"></dxi-column>
    <dxi-column dataField="FirstName"></dxi-column>
    <dxi-column dataField="LastName"></dxi-column>
    <dxi-column dataField="Position" [width]="130"></dxi-column>
    <dxi-column
        dataField="StateID"
        caption="State"
        [width]="125">         
        <dxo-lookup
            [dataSource]="states"
            displayExpr="Name"
            valueExpr="ID">
        </dxo-lookup>
    </dxi-column>
    <dxi-column
        dataField="BirthDate"
        [width]="125"
        dataType="date">
    </dxi-column>
</dx-data-grid>

如您所见,我尝试将这个弹出式选项块插入<dxo-edining>块内:

<dxo-popup
 title="Employee Info"
 [showTitle]="true"
 [width]="1300"
 [height]="345"
 [position]="{ my: 'top', at: 'top', of: window }">
</dxo-popup>

我的目的是能够自定义“删除”行(确认或不确认)

时出现的弹出窗口的出现。

那没用,

有什么建议吗?

0 个答案:

没有答案