Wimo 5 flexgrid not refreshing the cell style Angular 2/4

Posted by: sinha.palash08 on 28 December 2017, 8:05 pm EST

    • Post Options:
    • Link

    Posted 28 December 2017, 8:05 pm EST

    Hi,

    I am currently evaluating wijmo for one of our product.

    I am able to implement itemformatter on flexgrid to capture the edited cell and also i am able to change the style of the cell. But when i am rebinding the grid with the same data, the style stays the same for that particular cell. I have tried “refresh” and “refreshAll” but did not work. Could you please help me on how to refresh the flexgrid to set the cell style to default.

    Below is the code sample:

    //ts

    itemFormatter(panel, r, c, cell) {

    if (panel.cellType == wjGrid.CellType.Cell) {

    cell.style.border = getChanged(panel.grid, r, c) ? ‘2px solid red’ : ‘’;

    }

    }

    onUpdate(){

    this.wjdataValid = new wjCore.CollectionView(this.validatedDetails);

    this.wjdataValid.refresh();

    }

  • Posted 28 December 2017, 11:07 pm EST

    Hi,

    If We are correct, in this case your data is not getting updated in FlexGrid. You need to use the following code snippet for the same:

    onUpdate(){
    	this.wjdataValid.sourceCollection = this.validatedDetail);
    	this.wjdataValid.refresh();
    }
    

    You may also call FlexGrid refresh method for refreshing the FlexGrid.

    PS: If the cell styling is based on row and column index, styles may be remain applied.

    If the issue persists, please share a demo sample or code snippet for further investigation.

    ~Manish

Need extra support?

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

Learn More

Forum Channels