Edit Cell to show Link

Posted by: parmarkinjalk on 3 February 2020, 12:58 pm EST

  • Posted 3 February 2020, 12:58 pm EST

    Hi Team,

    I have a dataset which has a document name and document id property. What I am doing right now is showing the document name column with this
    wj-flex-grid-column
    [width]="'1.5*'"
    [header]="'Document Name'"
    [binding]="'documentNm'">


    Now what I want is document name to be a Link so that when I click the link a function is called with the entire item object to be send to this function, so that I can call the download doc API with the document id.
    I tried to use ng-template but when the page first loads my pagination is gone and it just shows the entire list on the first page and when I click next page the actual pagination starts. Also it not showing the doc name on IE when I use ng- template
  • Replied 3 February 2020, 1:06 pm EST

    Hi,

    Forget about the pagination issue. I solved it.
  • Replied 3 February 2020, 4:52 pm EST

    Hi Kinjalk,

    We are glad that you were able to resolve the issue. Could you please post the solution here so that others with the same issue can refer to your solution?

    Regards,
    Ashwin
  • Replied 4 February 2020, 3:04 am EST

    Hi Ashwin,

    I just resolved the pagination issue by setting the pagesize property before setting the sourcecollection property. I still can't figure out how to show the document name as a link and when I click that link it calls a function and pass the entire item as a object to it. I am using angular 6. Please read the original post for context.

    Thanks
  • Replied 5 February 2020, 6:31 am EST

    Thanks ashwin,

    The above solution is working for me on chrome. But on IE its giving me the following error. "** Assertion failed in Wijmo: Cannot find the host element." It shows the same error on chrome but the doc name is displayed on IE the doc name column is blank.
     this.http.get('assets/data.json')
    .subscribe(res => {
    this.grid.collectionView.beginUpdate()
    this.source._pgSz = 10;
    this.source._trackChanges = true;
    this.source.sourceCollection = res['documentMetadata'];
    this.grid.collectionView.endUpdate() });
    }


    <wj-flex-grid-column
    header="Document Name"
    binding="documentNm" [isReadOnly]="true">
    <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-item="item">
    <a href="#" (click)="linkClick(item)">{{item.documentNm}}</a>
    </ng-template>
    </wj-flex-grid-column>


  • Replied 5 February 2020, 8:10 pm EST

    Hello again,

    We were not able to replicate the issue at our end. Please refer to the sample below that we used to replicate the issue:

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

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

    Also, I would suggest you use the public properties pageSize and trackChanges instead of private properties like _pgSz and _trackChanges because they are only used internally and may change in the future release thereby breaking your application.

    ~regards
  • Replied 9 February 2020, 5:10 pm EST

    Hi Ashwin,

    I am using Wijmo Library 5.20162.207 and Angular 8.2.14. Could you please try with this config in IE. Its still not showing links. thanks.
  • Replied 11 February 2020, 3:51 pm EST

    Hi,

    We are working on this and will update you as soon as possible.

    ~regards
  • Replied 13 February 2020, 4:15 pm EST

    Hi Kinjalk,

    Since you are using a really old build, we will need some time to set up our environment. We will update you as soon as we have more information.

    ~regards
  • Replied 17 February 2020, 2:40 pm EST

    Hi Kinjalk,

    We are sorry but we were unable to create a sample with the provided configuration. Could you please provide us a sample that demonstrates how did you create an angular 8 application with 16v2?

    ~regards
Need extra support?

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

Learn More

Forum Channels