:: Forum >>

obj.getSelectedRows does not return array of selected row indices

My general code section is as follows:

var myData = [my data array here];
var myColumns = [my column headers here];
var currSel = new Array();

    function gridClick(src) {

        var index = parseInt(obj.getCurrentRow());
        if (isNaN(index)) {

    if (mode == GRID_MODE) {
        var ticket_id = myData[index][0];
    } else { // QUEUE_MODE

        visited = keyList;
        currSel = obj.getSelectedRows();

        if (currSel.length>1) {
            multiSelect = true ;
        } else {
            multiSelect = false ;
        for (c=0;c<currSel.length;c++) {
            ticket_id = myData[currSel[c]][0];
            keyList[ticket_id] = keyList[ticket_id] ? multiSelect : true ;

var obj = new AW.UI.Grid;

    //assign header and cell text for aw.js


    //set number of columns/rows for aw.js

    obj.setSelectorTemplate(new AW.Templates.CheckedItem);

    obj.onRowSelectedChanged = function(){gridClick()};

I used an alert call to see what the length of the 'currSel' array is after checking on multiple rows, and it always returns 1. The value is last selected index. What am I missing here?

Also, with the CheckedItem template, I have to click on the row, instead of the checkbox for the selection to show up. Why is that?
Sam H
Tuesday, May 8, 2012

This topic is archived.

Back to support forum

Forum search