Dynamic grid column is not getting copied in new row in wismo grid

Posted by: sbanerjee on 15 September 2020, 9:01 am EST

  • Posted 15 September 2020, 9:01 am EST

    In our wijmo grid we have few normal columns and few of them is generated dynamically.

    So when we copy the existing row which contains both normal and dynamic columns,and past it to the new row ,it does paste all the columns except the dynamic one.

    any help on this would be really appreciated.

    my wijmo code is here-last colum is dynamic

    <wj-flex-grid id=“dealfunding” #flexdealfunding [itemsSource]=“cvDealFundingList” [allowAddNew]=“true” [allowSorting]=“false” (initialized)=“fundingaddFooterRow(flexdealfunding)” [allowDelete]=“false” class=“gridSize”

    (pasted)=“Copieddealfunding(flexdealfunding,$event)” (rowAdded)=“Addnewfunding(flexdealfunding,$event)”

    (deletingRow)=“deletedealfunding($event)” (cellEditEnded)=“celleditfunding(flexdealfunding,$event)”

    (selectionChanged)=“dealfundingselectionChanged()”

    style=“height:calc(99.8vh - 190px);” (beginningEdit)=“cellEditbeginDealfunding(flexdealfunding,$event)”>

                                    <wj-flex-grid-column [name]="'buttons'" [header]="'Delete'" [isReadOnly]="true" align="left" [width]="60">
                                        <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell">
                                            <div *ngIf="cell.item.WF_IsFlowStart==0">
                                                <div *ngIf="!cell.item.Applied">
                                                    <a style="text-decoration: underline;cursor:pointer" (click)="showDeleteDialog(cell.row.index,'Deal funding')">Delete</a>
                                                </div>
                                            </div>
                                        </ng-template>
                                    </wj-flex-grid-column>
                                    <wj-flex-grid-column [header]="'Workflow'" [isReadOnly]="true" [width]="80">
                                        <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell">
                                            <div *ngIf="cell.item.WF_isParticipate">
                                                <div *ngIf="_deal.Statusid != 325 ">
                                                    <!--<div *ngIf="cell.item.Comment?.length >0 && cell.item.Comment==cell.item.OldComment && _deal.BoxDocumentLink != null">
                                                        <a (click)="showFundingCommentEmptyAlert(cell.item.Comment, _deal.BoxDocumentLink, cell.item.DealFundingID)">Open</a>
                                                    </div>-->
                                                    <div>
                                                        <a (click)="showFundingCommentEmptyAlert(cell.item.Comment, _deal.BoxDocumentLink, cell.item.DealFundingID,cell.item.Date,cell.item.Value,cell.item.PurposeID)" style="cursor:pointer">Open</a>
                                                        <!--<a href='/#/workflow/{{cell.item.DealFundingID}}' rel="nofollow" >Edit</a>-->
                                                    </div>
                                                </div>
                                            </div>
                                        </ng-template>
                                    </wj-flex-grid-column>
                                    <!--<wj-flex-grid-column [header]="'Date'" [binding]="'Date'" [width]="120" align="right" [wordWrap]="true"></wj-flex-grid-column>-->
                                    <wj-flex-grid-column [header]="'Date'" [binding]="'Date'" [dataType]="'Date'" [width]="110" align="right" [format]="'MM/dd/yyyy'">
                                        <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell">
                                            <div [ngStyle]="{backgroundColor: cell.item.isValidDate==false ? '#FFB3A7' : ''}">
                                                {{cell.item.Date | date :'shortDate'}}
                                            </div>
                                        </ng-template>
                                    </wj-flex-grid-column>
    
    
                                    <wj-flex-grid-column [header]="'Debt Amount'" [binding]="'Value'" [dataType]="'Number'" [width]="188" align="right" [aggregate]="'Sum'" format="n2" style="display:none">
                                        <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell">
                                            <div [ngStyle]="{color: cell.item.Value < 0? 'red' : 'darkgreen'}">
                                                {{cell.item.Value | number:'1.2-2'}}
                                            </div>
                                        </ng-template>
                                    </wj-flex-grid-column>
    
                                    <wj-flex-grid-column [header]="'Equity Amount'" [binding]="'EquityAmount'" [dataType]="'Number'" [allowResizing]="false" align="right" [aggregate]="'Sum'" format="n2" style="display:none">
                                        <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell">
                                            <div [ngStyle]="{color: cell.item.EquityAmount < 0? 'red' : 'darkgreen'}">
                                                {{cell.item.EquityAmount | number:'1.2-2'}}
                                            </div>
                                        </ng-template>
                                    </wj-flex-grid-column>
    
                                    <wj-flex-grid-column [name]="'Purpose'" [header]="'Purpose'" [binding]="'PurposeText'" [showDropDown]="true" [width]="175"></wj-flex-grid-column>
                                    <!--<wj-flex-grid-column [header]="'Wire Confirm'" [binding]="'Applied'"  [width]="95" align="left" ></wj-flex-grid-column>-->
    
    
                                    <wj-flex-grid-column [header]="'Confirmed'" [binding]="'Applied'" [width]="95">
                                        <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell">
    
                                            <div *ngIf="cell.item.WF_CurrentStatusDisplayName=='Completed' && cell.item.WF_IsCompleted==1">
                                                <input #fundingappiedchk type="checkbox" [checked]="cell.item.Applied" (change)="ChangeFundingappied(cell.item.DealFundingID,fundingappiedchk.checked,cell.row)" id="fundingappiedchk" [disabled]="rolename=='Super Admin' || rolename=='Admin' ? false: cell.item.Issaved" />
                                            </div>
                                            <!--<div *ngIf="(cell.item.WF_CurrentStatusDisplayName!='Completed' && cell.item.WF_IsAllow==0)">
                                                <input #fundingappiedchk type="checkbox" [checked]="cell.item.Applied" (change)="ChangeFundingappied(cell.item.DealFundingID,fundingappiedchk.checked,cell.row)" id="fundingappiedchk" [disabled]="rolename=='Super Admin' || rolename=='Admin' ? false: cell.item.Issaved" />
                                            </div>-->
    
                                            <div *ngIf="(cell.item.WF_CurrentStatus == null)">
                                                <input #fundingappiedchk type="checkbox" [checked]="cell.item.Applied" (change)="ChangeFundingappied(cell.item.DealFundingID,fundingappiedchk.checked,cell.row)" id="fundingappiedchk" [disabled]="rolename=='Super Admin' || rolename=='Admin' ? false: cell.item.Issaved" />
                                            </div>
                                        </ng-template>
                                    </wj-flex-grid-column>
                                    <wj-flex-grid-column [header]="'Status'" [binding]="'WF_CurrentStatusDisplayName'" [isReadOnly]="true" [width]="130" align="left">
                                        <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell">
                                            <div innerHTML="{{FormatWFStatusName(cell.item.WF_CurrentStatusDisplayName)}}">
                                            </div>
                                        </ng-template>
                                    </wj-flex-grid-column>
                                    <wj-flex-grid-column id="DealfundingCommentColumn" [header]="'Comment'" [binding]="'Comment'" [width]="130" align="left" [isReadOnly]="false">
                                    </wj-flex-grid-column>
                                    <!--<wj-flex-grid-column [header]="'Draw funding id'" [binding]="'DrawFundingId'" [width]="130" align="left"></wj-flex-grid-column>-->
                                    <wj-flex-grid-column *ngFor="let col of columnsForNoteDealFunding"
                                                         [header]="col.header"
                                                         [binding]="col.binding"
                                                         [format]="col.format"
                                                         [width]="col.width"
                                                         [aggregate]="col.aggregate"
                                                         [isReadOnly]="!col.allowEditing"
                                                         [dataType]="'Number'">
                                    </wj-flex-grid-column>
                                </wj-flex-grid>
    
  • Posted 16 September 2020, 7:15 am EST

    Hi Samrat,

    We are sorry but we were unable to replicate the issue at our end. Please refer to the sample link below that we used to replicate the issue:

    https://stackblitz.com/edit/angular-yjnryw

    Can you please let us know whether we are missing something in order to replicate the issue?

    You can also modify the sample so that it reproduces your issue.

    Regards,

    Ashwin

Need extra support?

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

Learn More

Forum Channels