:: Forum >>
obj.onCellClicked in DATAGRID
Salvador
Friday, June 11, 2010
That's because "obj.onCellClicked" is an ActiveWidgets version 2.x command, and the mentioned example is a 1.x version, you should use this instead.
var row = obj.getTemplate("row");
row.setEvent("onclick", function(){alert('row clicked')});
C+
Saturday, June 12, 2010
or also:
obj.getTemplate("row").setEvent("onclick", function(src){alert('clicked row #: ' + src.getProperty("row/index") )});
C+
Saturday, June 12, 2010
all goes well, I only need to print the value of a cell on the row which gave him click.
For example:
if I click on row 5 I want to print the value of a cell 1
this I print the value of the cell which gave click:
obj.setAction("click", function(src){alert(src.getProperty("item/text"))});
I always print the value in cell 1 of the active row
thanks
Salvador
Saturday, June 12, 2010
already try this:
obj.setAction("click", function(src){alert(this.getCellText(1, 1))});
obj.setAction("click", function(src){alert(src.getCellText(1, 1))});
var row = obj.getTemplate("row");
obj.setAction("click", function(src){alert(src.getCellText(1, row))});
I need to get the value of the first cell of all rows?
Salvador
Saturday, June 12, 2010
I did in previous versions as follows:
obj.onCellClicked = function(event, col, row){alert(this.getCellText(0, row)))};
but this version does not work as
Salvador
Saturday, June 12, 2010
ready, I got it, I leave the code
obj.setAction("click", function(src){window.open('../CLIENTES/DIS_DETALLES.asp?ID_CLIENTE='+myData[src.getItemProperty("index")][0]+'', '_parent', '')});
Salvador
Saturday, June 12, 2010
This topic is archived.
Back to support forum
Forum search