Posted 2 January 2022, 8:18 am EST
Im using the flex grid component to present a significant amount of data, and im storing the configuration for said grid in a .json file, column examples:
{
"name": "COL1NAME",
"binding": "COL_1_BIND",
"header": "Name",
"isReadOnly": true,
"align": "center",
"describedById": "fixed",
"aggregate": "Sum",
"format": "n0"
},
{
"name": "column2Name",
"binding": "COL_2_BIND",
"header": "name",
"isReadOnly": true,
"describedById": "fixed",
"visible": false
},
as shown in the example, Im using the format attribute in order to make sure the user is presented with an integer, the reason I do not convert to integer is because I want the user to see the full number if they enter the cell. my problem lies with the fact that although the formatting works with small amounts of data, it seems to only work then. if the amount of data exceeds what is shown on screen, when the user scrolls down the rest will be unformatted and they can see the full float, but once a change is made or a cell will update everything on screen will reformat, and only whats on screen.
my question is how can I make sure every cell in a column that has the format attribute will be formatted on grid initialization, all the way to the end.
my HTML code for the grid is as follows:
<wj-flex-grid
#flex
[(itemsSource)]="dataSource"
[autoGenerateColumns]="false"
[allowSorting]="'MultiColumn'"
(beginningEdit)="onBeginningEdit(flex, $event)"
(cellEditEnding)="onCellEditEnding(flex, $event)"
(selectionChanged)="selectionChanged(flex, $event)"
(formatItem)="onFormatGridItem(flex, $event)"
(pastingCell)="pastingCell(flex, $event)"
(keydown)="onFlexKeyPress(flex,$event)"
>
<wj-flex-grid-filter #filter></wj-flex-grid-filter>
</wj-flex-grid>