:: Forum >>

Grid with multi-row-marker selection mode in IE8

Can anyone verify this??

I have a grid with multi-row-marker selection mode turned on. I am showing 2 columns, but only using the first. I wrote an onRowClicked function to handle the event, but this does not fire in IE8 when you click in the first column that has the checkbox and my data. If I click on the second column it fires. Works fine in FireFox and other standards compliant browsers.

Thanks!
AT
Thursday, June 24, 2010
Ok, just tried some other events (onCellClicked...onControlClicked) and nothing is firing in IE8. The row color changes as it should...the checkbox checks and unchecks as it should, but my function doesn't seem to go.

Here's my code:
var grid= new AW.UI.Grid;
grid.setId("grid");
grid.setColumnCount(4);
grid.setHeaderText(["Username", "ID", "Rights", "Default"]);
grid.setSelectorVisible(false);
grid.setSelectionMode("multi-row-marker");
grid.setCellFormat([string, string, string, string]);
grid.setCellModel(table);
grid.setColumnIndices([0]);
grid.onRowClicked = function(event, row){
    alert(this.getCellValue(1, row))
};
grid.setCellImage(image, 0);
grid.refresh();
AT
Thursday, June 24, 2010
In that case need a different event:

grid.onSelectedRowsChanged = function(arrayOfRowIndices){
alert( arrayOfRowIndices);
}
C+
Thursday, June 24, 2010
That's great except I need to get the value of the row that was clicked on. onSelectedRowsChanged gives me an array of all the selected rows which doesn't really help me.
AT
Thursday, June 24, 2010
You can get this row number with an easy step:
arrayOfRowIndices[(arrayOfRowIndices.length)-1]

Please check also:
http://www.activewidgets.com/javascript.forum.15459.13/multi-row-marker-autoscrolls-to.html
C+
Thursday, June 24, 2010
Excellent! That does work, but is there any way to still check for a clicked event? My grid is being populated with rows already marked. So when it loads it fires the event handler function.
AT
Friday, June 25, 2010
Anybody else have anything to add??

Like I said before...I need to work with the onRowClicked event. The onSelectedRowsChanged is great and all, but it fires when the grid is loaded.

Also...still dont know why the onRowClicked event works fine in Firefox and not IE.

Thanks!
AT
Monday, June 28, 2010
OK...finally getting back to this...I dove into the code and found that anytime the multi-row-marker changes it is being refreshed. This means that when the grid loads and after every click it is immediately being refreshed. Once I commented out the refresh, my onRowClicked event works fine in IE.

The only issue is that now the row is selected, but the check box doesn't change. This actually seems to work out to my advantage though. When the row is clicked I can fire off my actions and then force a refresh when they are done which reloads the data in the table and now my check box is checked.

Like I said, it seems like a hack, but for now it works.
AT
Wednesday, July 21, 2010

This topic is archived.


Back to support forum

Forum search