|
ludwigl
|
 |
« on: August 09, 2010, 05:24:24 AM » |
|
Hi linb,
I am using V3.0 R939 and I am failing to turn off a cellRenderer which is defined for a column in the header specification. Please see the following code:
host.ctl_pane16.append( (new linb.UI.TreeGrid) .setHost(host,"ctl_treegrid5") .setRowNumbered(true) .setHeader([{"id":"col1", "width":80, "type":"number", "caption":"col1", "cellRenderer":function (i, oi) { alert("in CellRenderer with value " + i.value); // only for debugging purposes return Number(Math.round(i.value * 100) / 100).toFixed(2);}}, {"id":"col2", "width":80, "type":"label", "caption":"col2"}])
.setRows([{"cells":[{"value":1.229, "id":"c_a", "oValue":1.229}, {"value":"r1c2", "id":"c_b", "oValue":"r1c2"}], "id":"e"}, {"cells":[{"value":"", "id":"c_a", "type":"label", "cellRenderer":null, "oValue":""}, {"value":"", "id":"c_b", "oValue":""}], "id":"f"}, {"cells":[{"value":1.506, "id":"c_a", "oValue":1.506}, {"value":"r3c2", "id":"c_b", "oValue":"r3c2"}], "id":"g"}]) );
In previous releases (Version 2.2) row two in the grid was empty, which was the intended behaviour, now the string "0.00" is displayed, because the cellRenderer function is executed, although I set it to "null" for this specific cell.
Is this a bug or change in behaviour? In case it is not a bug, how can I output an empty row in my example.
Thanks in advance for your help,
Ludwig
|