3
votes

I'm trying to fire auto click on first row for a 'table' After Render. in icCube 6 (3961)

enter image description here

but when i use

function(context, data, $box) {
 context.fireRowClick(0)
}

i get error context.fireRowClick is not a function

1
there is an issue with the context, we're going to fix this for the next releaseic3
thanks for fast replyItay Regev

1 Answers

2
votes

This error has been repaired in >= icCube 6 (4036). Please update when it becomes available. As a workaround you could use the following fragment that sends event using the different context type:

function(context, data, $box) {
    if(context.fireRowClick){
        // context is table/widget context
        context.fireRowClick(0);    
    } else {
        // context is reporting context (before the fix)
        var axisIndex = data.getAxes().getAxisCount() - 1;        
        var event = new viz.event.SingleSelectionEvent({
            uniqueName : data.getAxes().getAxis(axisIndex).getMemberUniqueName(0,0),
            name : data.getAxes().getAxis(axisIndex).getMemberCaption(0,0),
        })
        context.eventMgr().fireEvent('rowClick', event)
    }
}