Wj flexgrid itemsource

Posted by: ksravyasd on 20 March 2018, 8:50 am EST

  • Posted 20 March 2018, 8:50 am EST

    hi,

    so when i click on button in my product page it takes me to renewal page , in the same way if i click on a button in invoices it should take me to the renewal page where we have a flex grid. so for this if use query params. how would i set itemssource so that it gives correct data when i do either of the clicking .

  • Posted 20 March 2018, 9:15 pm EST

    You need to use itemformatter for this. Let me know if you are facing issues

    itemFormatter(panel: any, rowIndex: number, columnIndex: number, cell: HTMLElement) {
            if (panel.cellType === wijmo.grid.CellType.Cell) {
                var column = panel.columns[columnIndex];
                switch (column.name) {
                case 'link':
                    let dataItem = panel.rows[rowIndex].dataItem;
                    if (dataItem) {
                        let id = dataItem['Id'];
                        if (id) {
                            let link = "<a href='#/edit-topic?" + id + "' rel="nofollow">Edit</a>";
                            cell.innerHTML = link;
                        }
                    }
                    break;
                }
            }
        }
    
Need extra support?

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

Learn More

Forum Channels