:: Forum >> Version 2 >>

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");
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?

Erik Dobrie
Monday, March 12, 2012
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
Wednesday, April 18, 2012

This topic is archived.

Back to support forum

Forum search