:: Forum >> Version 2 >>

How to get/set cell value inside of Template?

Example:

My.Templates.T1 AW.Templates.Text.subclass();
My.Templates.T1.create = function() {
    var 
obj this.prototype;
    var 
editor AW.HTML.INPUT;
    
editor.setClass("templates""input");
    
editor.setClass("type""text");
    
editor.setAttribute("readonly""yes");

   
// now i want get the cell value and set into editor
   
editor.setAttribute("value"/*HERE, CELL VALUE/TEXT*/);

   
obj.element().innerHTML editor;
}

My.Templates.T1.create();
 
Any help? tkz.
pc
Wednesday, April 12, 2006
If you want to get/set property value from inside the template you should use getXXXProperty(name) and setXXXProperty(name, value) where XXX is your model name (for example, Cell, Header, Row etc.). The standard templates always call Control model which is redirected (using mapModel method) to whatever is appropriate. For example, the calls to Control properties from inside the cell template are redirected to Cell model and the same Control property requests from header template go to Header model.
Alex (ActiveWidgets)
Thursday, April 13, 2006



This topic is archived.

Back to support forum

Forum search