3.2.0

setStyle Method quit working for rows

I used to be able to use the setStyle method for manipulating a row, but for some reason, it stopped working altogether.

It does work if I use it with the main object (obj)

The grid shows up just fine, but doesn't change like I want it to.

Code:
var custRowH = 70;
obj.onCellClicked = function(event, column, row){
    obj.getRowTemplate(row).setStyle("height", custRowH);
    obj.getRowTemplate(row).refresh();
}


I've been trying to get this for a week now and haven't been able to figure out anything.
Craig
September 12,
It is very likely that you are using obj variable somewhere else, so it does not refer to the grid anymore. In all event handlers this keyword refers to the control itself, so your code should be

var custRowH = 70;
obj.onCellClicked = function(event, column, row){
    this.getRowTemplate(row).setStyle("height", custRowH);
    this.getRowTemplate(row).refresh();
}


Alex (ActiveWidgets)
September 13,

This topic is archived.

See also:


Back to support forum