3.2.0

Button in cell

Based on code someone else wrote I am putting a button in a grid column, here is the code:

var formTemplate1 = new AW.System.Template;
formTemplate1.setClass("item", "template");
formTemplate1.setClass("templates", "cell");

var button1 = new AW.HTML.BUTTON;
button1.setContent("html", "Delete");
button1.setEvent("onclick","TAB06030201Delete(event)")
button1.setSize(40,20);
button1.setStyle("font-size","10px");
button1.setStyle("text-align","center");
button1.setStyle("line-height","normal");
button1.setAttribute("disabled","_GRIDBUTTON_");
formTemplate1.setContent("button", button1);

...

grid.setCellTemplate(formTemplate1, 2);

This work good until I change the selection mode to "single-cell". When in sincle-cell mode the grid will NOT update the current row when the button is clicked so a call to getCurrentRow() can produce an incorrect row number.

Any ideas on how to update the current row when the button is clicked?

Thanks,
Erik Dobrie
March 12,
Anyone have a suggestion on how to possibly fix this behavior? Is there another control type that would work properly in single-cell mode?

Any pointers appreciated.
Erik Dobrie
April 18,

This topic is archived.

See also:


Back to support forum