:: Forum >>
Update the next cell after edit using Text Input template
I'm using the text input template like in this topic
http://www.activewidgets.com/javascript.forum.1394.55/textbox-template-edit-on-double.html
I did some calculation from the data that was entered in the textbox and I want to display the result in the next cell. I put the updated value into the next slot in the data model's array but can't find the way to refresh the display of that cell. Is it possible?
PS. I calculate data inside the
switchToTextMode() function
Panit W.
Saturday, June 3, 2006
Sorry, I'm using Version 1 but forgot to choose Version 1 when I posted.
Panit W.
Saturday, June 3, 2006
I finally found the solution...
just pass the reference to the grid at the template create() function and then call the ordinary cell refresh code
My.Templates.Input = Active.Templates.Text.subclass();
My.Templates.Input.create = function(theGrid) {
...
...
and after the grid object creation code, pass its reference to the create() function
var obj = new Active.Controls.Grid;
My.Templates.Input.create(obj);
...
...
in the switchToTextMode() function after manipulate the data model. refresh the cell by calling this code.
theGrid.getRowTemplate(row).getItemTemplate(column).refresh();
Panit W.
Saturday, June 3, 2006
This topic is archived.
Back to support forum
Forum search