3.2.0

Add a button to a cell

I'm trying to figure out how to have a column that is a button type.

any suggestions anyone?
David D.
May 15,
Try to enter HTML text as cell text.
In the Tutorial\Quick start try to enter something like this:

var myData = [
["<input type=button value='Click me !' onclick='alert(\"clicked\")'>", 123.45],
["text2", 678.90]
];



Sorin
May 16,
i decided to go with a ACTIVE.HTML.IMG type instead of button.

var image = new Active.HTML.IMG;
    image.setAttribute("SRC","./images/d1.jpg"); 
    image.setStyle('width', 75); 
    image.setStyle('height','20');
    image.setEvent("onmouseover", "this.src='./images/d2.jpg'");
    image.setEvent("onmouseout", "this.src='./images/d1.jpg'");
    image.setEvent("onclick",function (src){ alert("downloading file"); });
    obj.setColumnTemplate(image,1);


now i'm trying to only apply this item to columns that contain a certain value. for example i'm using xml, so if the xml-field 'HasButton' is 1, show it, if it is 0 dont.
DoubleD
May 17,

This topic is archived.

See also:


Back to support forum