3.0.5

Change one Cell NOT dynamically

noticed several reference re changing a cell dynamically, I don't need that all I want to do is edit eg. a sing cell before it gets printed to the screen but after the data was assigned to the grid

eg. I'm reading in data from a database but want to replace one of the column's data with an image instead...

I can't see how to do it this... can anyone help????... must real easy but I don't see how...

another thing the eg "ojb.setColumnCount()" method, or "obj.setDataText()" methods I found in the PHP example code I can't find anywhere in the reference or source code???? how do they work if they are not there....

I know it's something real simple... any help appreciated!!
TenC
July 19,
just wondering whey doesnt this work????

var obj = new Active.Controls.Grid;
obj.setColumnTemplate(new Active.Templates.Image, 4);
obj.setDataText(function(i, j){return obj_data[i][j];});
obj.setDataImage(function(i, j){return obj_data[i][4];});
...


can anybody see what I'm doing wrong??

thanks
TenC
July 19,
I found the offending code:

var obj = new Active.Controls.Grid;
  obj.setColumnTemplate(new Active.Templates.Image, 4);
  obj.setRowProperty("count", 2);
  obj.setColumnProperty("count", 5);
  obj.setDataProperty("text", function(i, j){return obj_data[i][j]});
  obj.setDataProperty("image",function(i, j){return obj_data[i][4];});
  obj.setColumnProperty("texts" , ["Name", "Size", "Type", "Date Modified","add"]);
[b]	var row = new Active.Templates.Row;
    row.setEvent("onmouseover", "mouseover(this, \'active-row-highlight\')");
    row.setEvent("onmouseout", "mouseout(this, \'active-row-highlight\')");
    obj.setTemplate("row", row);[/b]
  document.write(obj);


the row highlighting (bold) somehow interfers with displaying the image... anybody have an idea why?... is it possible to have both row highlithing and images???

any feedback would be greatly appreciated... thanks
TenC
July 19,
the bold within the code didnt work
so I'll post it again... its this part that cause the problems in the code above

var row = new Active.Templates.Row; 
    row.setEvent("onmouseover", "mouseover(this, \'active-row-highlight\')"); 
    row.setEvent("onmouseout", "mouseout(this, \'active-row-highlight\')"); 
    obj.setTemplate("row", row);
TenC
July 19,
ok have found the solution!!!

you have to set the column template after the row template

jeez what nightmare..........
TenC
July 19,

This topic is archived.

See also:


Back to support forum