How do we select row headers?

In the multiple selection example, rows can be selected only by clicking in the data area. Is it possible to select one or more row by clicking the row headers as well?

August 25,
Nevermind, there was a comment here: http://www.activewidgets.com/javascript.forum.4351.12/clicking-row-headers.html

The code I was looking for is as follows:

//	create ActiveWidgets Grid javascript object
    var obj = new Active.Controls.Grid;

    //	set number of rows/columns
    obj.setRowProperty("count", <%= addressCounter %>);
    obj.setColumnProperty("count", 6);

    //	provide cells and headers text
    obj.setDataProperty("text", function(i, j){return myData[i][j]});
    obj.setColumnProperty("text", function(i){return myColumns[i]});
    var row = new Active.Templates.Row;
    row.setEvent("onmouseover", "mouseover(this, 'active-row-highlight')");
    row.setEvent("onmouseout", "mouseout(this, 'active-row-highlight')");


    //	set headers width/height

 ... data population snipped ...

    // create a row selection event 
    var selectRow = function(event)	
        if (event.shiftKey) {return this.action("selectRangeOfRows")} 
        if (event.ctrlKey) {return this.action("selectMultipleRows")} 

    // assign row selection event to left/item 
    obj.getLeftTemplate().getItemTemplate().setEvent("onclick", selectRow);
August 25,

This topic is archived.

See also:

Back to support forum