Problem with cell.item in template

Posted by: mail2ravindar on 16 October 2017, 11:53 pm EST

    • Post Options:
    • Link

    Posted 16 October 2017, 11:53 pm EST

    I am displaying table data by wijmo flex grid.in that below column has an hyperlink.

    When i click on sorting ,the values in column are invisible. i assume the problem is at at {{cell.item.expectedFileName}} .Could you please help on it.Thanks in advance.

    <wj-flex-grid-column [header]=“‘Expected File Name’” [width]=“250 [binding]=”‘expectedFileName’" >

     <template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell" allowSorting="true" >
    
         <a (click)="goToAdminFileInstancePage(cell.item.fileSetupId._id)">{{cell.item.expectedFileName}} </a>
    
      </template> 
    
  • Posted 17 October 2017, 8:08 pm EST

    Hi,

    With the below code, I dont see any issues:

    <wj-flex-grid #flex 
            [itemsSource]="data" 
            [isReadOnly]="false"
            selectionMode="Cell"
            >
        <wj-flex-grid-column header="Url" binding="url"  [width]="250">
            <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell" allowSorting="true" >
                    <div>
                            <a (click)="goTo(cell.item.url)">{{cell.item.url}}</a>
                    </div>
            </ng-template>
       </wj-flex-grid-column>
    </wj-flex-grid>
    

    Service:

    export class DataSvc{
        getData(){
             let countries = 'US,Germany,UK,Japan,Italy,Greece'.split(','),
            data = [];
            for (var i = 0; i < 1000; i++) {
                data.push({
                    id: i,
                    html: '<b>' + countries[i % countries.length] + '</b>',
                    country: countries[i % countries.length],
                    date: new Date(2014, i % 12, i % 28 + 1),
                    amount: (i % 123) * 10000,
                    active: i % 4 == 0,
                    discount: Math.random(),
                    url: 'https://www.grapecity.com/en/forums/wijmo/problem-with-cellitem-in-t'
                });
            }
            return data;
        };
    }
    
    

    Can you provide a sample? Or modify the code above

    ~nilay

  • Posted 22 October 2017, 9:52 pm EST

    Thanks Nilay, after removing (sortedColumn)=“sortedColumn(flex)” from my code it is working fine.

Need extra support?

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

Learn More

Forum Channels