3.2.0

How to select (or paint highlight) a row whitout user click (simulate click)

I have defined function that onClick fill a input field of my web form.
my function work correctly but the highligh color not appear in spite of a time before that i set the new Action for onClick, it was works well and it was washing well the highlight color.

my grid definition:
var grid = new Active.Controls.Grid;
...
var row = new Active.Templates.Row;
...
row.setEvent("onclick", function () {this.action("clickAction") ; });
...
grid.setAction("clickAction", gestionInternaClick);
...
var gestionInternaClick =
function (src)
{
var indexRowSelected;
indexRowSelected = src.getProperty("item/index");

eval("var functionExist = typeof gestionClickGrid__" + _grid_nombre + " == 'function';");
if(functionExist )
{
gestionClickGrid(getIdRow(grid,indexRowSelected));
}
};
...

function gestionClickGrid(indexRowSelected)
{
document.forms[0].idSeleccionGrid.value=indexRowSelected;
}

I Need Help, Thank You.
Eduardo Serrano Luque
August 24,
I have defined an onClick event handler which fills an input field in a web form. This function works correctly except for its highlighting color, which isn't shown. This feature was working well before I added the new handler, so there's something I must be doing badly. The following is what I've go so far:


my grid definition:
var grid = new Active.Controls.Grid;
...
var row = new Active.Templates.Row;
...
row.setEvent("onclick", function () {this.action("clickAction") ; });
...
grid.setAction("clickAction", gestionInternaClick);
...
var gestionInternaClick =
function (src)
{
var indexRowSelected;
indexRowSelected = src.getProperty("item/index");

eval("var functionExist = typeof gestionClickGrid__" + _grid_nombre + " == 'function';");
if(functionExist )
{
gestionClickGrid(getIdRow(grid,indexRowSelected));
}
};
...

function gestionClickGrid(indexRowSelected)
{
document.forms[0].idSeleccionGrid.value=indexRowSelected;
}
Eduardo Serrano Luque
August 24,
solution:

function (src)
{
var indexRowSelected;
indexRowSelected = src.getProperty("item/index");
//aquiiiiiiiiiiiiiiiii------------------------
src.action("selectRow");
//-----------------------------------

eval("var functionExist = typeof gestionClickGrid__" + _grid_nombre + " == 'function';");
if(functionExist )
{
Eduardo Serrano Luque :D
August 24,
try this
function (src)
{
var indexRowSelected;
indexRowSelected = src.getProperty("item/index");
src.setSelectionProperty("index", indexRowSelected);
...
glennlosentes
August 24,

This topic is archived.

See also:


Back to support forum