[Data Grid] Datagrid group header shows undefined

Forge Component
(38)
Published on 8 Jun (4 weeks ago) by OutSystems R&D
38 votes
Published on 8 Jun (4 weeks ago) by OutSystems R&D

Platform - Outsystems 11 - Traditional web

While using datagrid with first column having an "OSCellRenderer" to make the column a link, and another column which has "IsGrouped" = True, the group headers are always shown as "undefined"

Please help


Solution

Linto Antony wrote:

Platform - Outsystems 11 - Traditional web

While using datagrid with first column having an "OSCellRenderer" to make the column a link, and another column which has "IsGrouped" = True, the group headers are always shown as "undefined"

Please help



I was able to fix this by adding one more null check for my attribute panel.rows[row].dataItem.attrId inside the below condition so that the group column headers are excluded from the OSCellRenderer

if (panel.cellType == wijmo.grid.CellType.Cell) {  
    if(panel.rows[row].dataItem.attrId != undefined){
        cell.innerHTML = '<a href="javascript: fnPopupUpsert(' + panel.rows[row].dataItem.attrId + ',\'' + panel.rows[row].dataItem.attrName + '\');">'+ panel.rows[row].dataItem.attrName +'</a>';
    }        
    }

Solution