我开发了一个数据网格。我打算该网格上的行是分开的,所以我使用了border-collapse:separate。
我的问题是,使用它我无法为线条添加边框。
有没有办法为行添加边框并保持表格行分开?
<dx-data-grid style="margin-top:50px" class="tableTask" [dataSource]="datas"
[showColumnLines]="false" [showRowLines]="false" [columnAutoWidth]="true" [allowColumnResizing]="true">
<dxo-header-filter [visible]="true"></dxo-header-filter>
<dxi-column dataField="ID" dataType="text" caption="ID"></dxi-column>
<dxi-column dataField="Name" dataType="text" caption="Name"></dxi-column>
</dx-data-grid>
css
::ng-deep .tableTask .dx-datagrid-headers {
letter-spacing: 0;
color: #4D4F5C !important;
font-weight: bold !important;
font-size: 13px !important;
background-color:#EDF3F9;
-ms-touch-action: pinch-zoom;
touch-action: pinch-zoom;
border-radius: 8px 8px 0px 0px;
height: 60px;
line-height: 18px;
border-bottom: none !important;
}
::ng-deep .tableTask .dx-datagrid-rowsview .dx-row {
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
background: #FFFFFF 0% 0% no-repeat padding-box;
box-shadow: 0px 3px 20px #BCBCCB47;
border-radius: 8px;
opacity: 1;
}
::ng-deep .tableTask .dx-datagrid-rowsview .dx-row {
line-height: 50px;
height: 60px;
}
::ng-deep .tableTask .dx-datagrid-headers + .dx-datagrid-rowsview {
border-top: 0 !important;
}
::ng-deep .tableTask .dx-datagrid-content .dx-datagrid-table {
border-collapse: separate !important;
border-spacing: 0px 16px !important;
}
::ng-deep .tableTask .dx-datagrid-headers .dx-datagrid-table .dx-row > td {
border-bottom: none;
}