1

这是代码

<DxDataGrid Data="@dischargeBoards"
                ShowFilterRow="true"
                ShowPager="true"
                ShowGroupPanel="true">
        <DxDataGridColumn Field="@nameof(DischargeGetBoardVisits.DischargeDateExp)" Caption="D/C Exp"  DisplayFormatString="D" EditFormatString="d"></DxDataGridColumn>

    </DxDataGrid>

如何解决此问题以及如何更改此网格的字体大小。

4

1 回答 1

1

虽然DxDataGridColumn没有 DisplayFormatString 和 EditFormatString 属性,但您可以通过手动格式化以所需格式显示数据。所以,算法如下:

  1. 获取数据。
  2. 格式化它。
  3. 将您的格式化数据分配给“dischargeBoards”。

PS 目前, DxDataGridDateEditColumn 和 DxDataGridSpinEditColumn 具有 DisplayFormatString 属性:DisplayFormatStringDisplayFormatString

至于更改网格的字体大小,请设置其CssClass属性(例如,设置为“my-grid”值)并应用以下 CSS 规则:

    .my-grid, .my-grid .btn   {
        font-size: 12px;
    }
于 2019-10-18T08:52:08.537 回答