Item Formatting Only on Load

Posted by: guy.batsha on 2 January 2022, 8:18 am EST

  • 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>
    
    
  • Posted 3 January 2022, 3:08 am EST

    Hello,

    We apologize but we are unable to replicate the issue at our end, would you please clarify if you are facing the issue in the below-shared sample too? If yes, please share some screenshots/gif of the issue or error. If you are facing this issue only in your application but not in the shared sample then it is possible that the issue is arising due to some code specific to your application. Since we are unable to replicate the issue, I would request you to share a sample that demonstrates the issue so that we could further investigate the root cause of the issue and assist you accordingly. Without a sample to replicate the issue, we cannot comment on the actual nature of the issue.

    Also, feel free to update the sample given below to replicate the issue and send us back so that we can investigate and assist you accordingly.

    Sample link: https://stackblitz.com/edit/angular-zos3mr?file=src%2Fapp%2Fapp.component.html

    Regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels