multiple widgets in one cell
Great grid first of all...
I can't get multiple Active.HTML.INPUT's in one cell. After creating a div container where I put my delete row and another control, it says this.$owner has no properties. The created container object looks like this then :
------------------------------------------------------------
<div id="tag54" oncontextmenu="return false" onselectstart="return false">
<div><div id="tag58" class="active-templates-button gecko" oncontextmenu="return false" onselectstart="return false" onclick="dispatch(event,this)"><input id="tag58/button" class="active-input-button gecko" type="button" value="Rate-Down"></input></div
></div><div><div id="tag57" class="active-templates-button gecko" oncontextmenu="return false" onselectstart="return false" onclick="dispatch(event,this)"><input id="tag57/button" class="active-input-button gecko" type="button" value="Rate-Up"></input></div></div></div>
------------------------------------------------------------
the code which is generating the above is the following :
My.Templates.Container = Active.System.Control.subclass();
My.Templates.Container.create = function(){
var obj = this.prototype;
//obj.setClass("templates","button");
var container = new Active.HTML.DIV;
var deleteB = new My.Templates.Button;
deleteB.getContent("button").setAttribute("value","delete");
deleteB.setEvent("onclick", function(){alert(this.getRowProperty("index"))});
var rateuB = new My.Templates.Button;
rateuB.getContent("button").setAttribute("value","Rate-Up");
rateuB.setEvent("onclick", function(){alert(this.getRowProperty("index"))});
var ratedB = new My.Templates.Button;
ratedB.getContent("button").setAttribute("value","Rate-Down");
ratedB.setEvent("onclick", function(){alert(this.getRowProperty("index"))});
var str = '<div>' + ratedB + '</div><div>'+ rateuB + '</div>';
obj.setContent("html", str );
/* document.write("<textarea cols=70 rows=30>");
document.write(obj);
document.write("</textarea>"); */
};
My.Templates.Container.create();
obj.setColumnTemplate(new My.Templates.Container, 6);
-----------------------------------------------------------------
I couldn't find any examples to showing this, I hope one of you can help me with this.
Regards,
Maarten
I can't get multiple Active.HTML.INPUT's in one cell. After creating a div container where I put my delete row and another control, it says this.$owner has no properties. The created container object looks like this then :
------------------------------------------------------------
<div id="tag54" oncontextmenu="return false" onselectstart="return false">
<div><div id="tag58" class="active-templates-button gecko" oncontextmenu="return false" onselectstart="return false" onclick="dispatch(event,this)"><input id="tag58/button" class="active-input-button gecko" type="button" value="Rate-Down"></input></div
></div><div><div id="tag57" class="active-templates-button gecko" oncontextmenu="return false" onselectstart="return false" onclick="dispatch(event,this)"><input id="tag57/button" class="active-input-button gecko" type="button" value="Rate-Up"></input></div></div></div>
------------------------------------------------------------
the code which is generating the above is the following :
My.Templates.Container = Active.System.Control.subclass();
My.Templates.Container.create = function(){
var obj = this.prototype;
//obj.setClass("templates","button");
var container = new Active.HTML.DIV;
var deleteB = new My.Templates.Button;
deleteB.getContent("button").setAttribute("value","delete");
deleteB.setEvent("onclick", function(){alert(this.getRowProperty("index"))});
var rateuB = new My.Templates.Button;
rateuB.getContent("button").setAttribute("value","Rate-Up");
rateuB.setEvent("onclick", function(){alert(this.getRowProperty("index"))});
var ratedB = new My.Templates.Button;
ratedB.getContent("button").setAttribute("value","Rate-Down");
ratedB.setEvent("onclick", function(){alert(this.getRowProperty("index"))});
var str = '<div>' + ratedB + '</div><div>'+ rateuB + '</div>';
obj.setContent("html", str );
/* document.write("<textarea cols=70 rows=30>");
document.write(obj);
document.write("</textarea>"); */
};
My.Templates.Container.create();
obj.setColumnTemplate(new My.Templates.Container, 6);
-----------------------------------------------------------------
I couldn't find any examples to showing this, I hope one of you can help me with this.
Regards,
Maarten
Maarten
April 12,