disable/enable row.setEvent
It looks if i use row.setEvent that no other onmouseover or onmouseout event will be work. I like to use a hidden div with some form data.
If a row will be selected with a rowclick, the hidden div becomes visible and for this case i have to stop the onmouseover or onmouseout event for the grid.
How can i disable/enable the row.setEvent ?
Example:
var gridcols = ["Ticker", "Company Name", "Market Cap.", "$ Sales", "Employees"];
var numrows=gridrows.length;
var numcols=gridcols.length;
var objgrid = new Active.Controls.Grid;
objgrid.setRowCount(numrows);
objgrid.setColumnCount(numcols);
objgrid.setDataText(function(i, j){return gridrows[i][j]});
objgrid.setColumnText(function(i){return gridcols[i]});
objgrid.setRowHeaderWidth("28px");
objgrid.setColumnHeaderHeight("20px");
var row = new Active.Templates.Row;
row.setEvent("onmouseover", "mouseover(this, 'active-row-highlight')");
row.setEvent("onmouseout", "mouseout(this, 'active-row-highlight')");
objgrid.setTemplate("row", row);
function myColor(){var value = this.getProperty("item/index");return (value & 1) ? "#FAFAFA" : "white";}
objgrid.getTemplate("row", 0).setStyle("background-color", myColor);
var datatrans = function(){
// call a subform div
// ?? how to disable row.setEvent
}
objgrid.setAction("selectionChanged", datatrans);
document.write(objgrid);
P.S
It looks like that the last column (empty) are not working with objgrid.getTemplate("row", 0).setStyle
If a row will be selected with a rowclick, the hidden div becomes visible and for this case i have to stop the onmouseover or onmouseout event for the grid.
How can i disable/enable the row.setEvent ?
Example:
var gridcols = ["Ticker", "Company Name", "Market Cap.", "$ Sales", "Employees"];
var numrows=gridrows.length;
var numcols=gridcols.length;
var objgrid = new Active.Controls.Grid;
objgrid.setRowCount(numrows);
objgrid.setColumnCount(numcols);
objgrid.setDataText(function(i, j){return gridrows[i][j]});
objgrid.setColumnText(function(i){return gridcols[i]});
objgrid.setRowHeaderWidth("28px");
objgrid.setColumnHeaderHeight("20px");
var row = new Active.Templates.Row;
row.setEvent("onmouseover", "mouseover(this, 'active-row-highlight')");
row.setEvent("onmouseout", "mouseout(this, 'active-row-highlight')");
objgrid.setTemplate("row", row);
function myColor(){var value = this.getProperty("item/index");return (value & 1) ? "#FAFAFA" : "white";}
objgrid.getTemplate("row", 0).setStyle("background-color", myColor);
var datatrans = function(){
// call a subform div
// ?? how to disable row.setEvent
}
objgrid.setAction("selectionChanged", datatrans);
document.write(objgrid);
P.S
It looks like that the last column (empty) are not working with objgrid.getTemplate("row", 0).setStyle
December 16,