Rashed Hossen
Rashed Hossen

Reputation: 101

'DevExpress.Blazor.DxDataGridColumn' does not have a property matching the name 'DisplayFormatString'

Here is the code

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

    </DxDataGrid>

How to fix this issue and how can i change the font size for this grid.

Upvotes: 2

Views: 2390

Answers (1)

Paul
Paul

Reputation: 110

While DxDataGridColumn doesn't have the DisplayFormatString and EditFormatString properties, you can show data in the required format by formatting it manually. So, the algorithm is the following:

  1. Get data.
  2. Format it.
  3. Assign your formatted data to "dischargeBoards".

P.S. Currently, DxDataGridDateEditColumn and DxDataGridSpinEditColumn have the DisplayFormatString property: DisplayFormatString, DisplayFormatString

As for changing the font size of the grid, set its CssClass property (for example, to the "my-grid" value) and apply the following CSS rule:

    .my-grid, .my-grid .btn   {
        font-size: 12px;
    }

Upvotes: 2

Related Questions