3.2.0

IE7 vs FF grid issue

Ok, so I know that IE7 and FF are very different in how they do...well everything. What I am trying to accomplish here is draw the grid and then select and fire the onclick event of the first grid row. The grid draws fine...the first row is selected fine...but firing the onclick event is where the there's a problem. Oh, and of course, this works perfectly in FF, but all IE7 does is display an empty dialog box.

var table= new AW.XML.Table;
table.setURL("files.xml");
table.setParameter("random", Math.random());
table.setRows("//files/*");
table.setColumns(["name", "size", "created", "modified"]);
table.request();
var defaultResponse = table.response;   
table.response = function(xml){  
    defaultResponse.call(this, xml);  
    
    grid.setSelectedRows([0]);
    grid.setCurrentRow(0); 
    grid.onRowClicked(0);
}
var grid= new AW.UI.Grid;
grid.setId("grid");
grid.setHeaderText(["Name", "Size", "Date Created", "Date Modified"]);
grid.setColumnCount(4);
grid.setCellFormat([string, filesize, uxdate1, uxdate1]);
grid.setSelectorVisible(false);
grid.setSelectionMode("single-row");
grid.setCellModel(table);
grid.onRowClicked = function(event, rowIndex){	
    alert(grid.getCellText(0, grid.getRowPosition(rowIndex)))
}


I'm stumped. Anyone have any ideas? Thanks.
AT
May 5,
Try this way:
grid.onRowClicked = function(event, rowIndex){    
var thisrowposition = grid.getRowPosition(rowIndex) ;
    alert(grid.getCellText(0, thisrowposition )) 
}
May 5,
Nope..I am seeing the same issue. I've even stepped back and tried to just alert the rowIndex and it comes up empty as well.
AT
May 7,
Your call arguments do not match the arguments in event handler -

grid.onRowClicked(0);

vs.

grid.onRowClicked = function(event, rowIndex){...
Alex (ActiveWidgets)
May 7,
OK...I don't know if this is the preferred method, but doing this seems to work:
grid.onRowClicked(0,0);

AT
May 11,

This topic is archived.

See also:


Back to support forum