3.2.0

PROBLEM setId() in Grid

when setId have name.other cant change widthcolumn.

i need this id because i have

var myobj = new objet();
myobj.Grid = obj;

i need change property Grid with myobj.Grid.setColumnWidth([100,300,500,600]); for example, but AW.UI.Grid is buged when setId have .

<script>
var myCells = [
["MSFT","Microsoft Corporation", "314,571.156", "32,187.000"],
["ORCL", "Oracle Corporation", "62,615.266", "9,519.000"],
["SAP", "SAP AG (ADR)", "40,986.328", "8,296.420"]
];
var obj = new AW.UI.Grid;
obj.setCellText(myCells);
obj.setColumnCount(4);
obj.setRowCount(3);
obj.setId("objet.Grid");
obj.setColumnWidth([100,300,500,600]);
document.write(obj);
</script>
Gustavo
March 2,
Gustavo, setId does NOT accept [object] as parameter (should be string) so just change the quotes location:

Instead of:
obj.setId("objet.Grid");
use:
obj.setId(objet.Grid);

and instead of:
myobj.Grid = obj;
use:
myobj.Grid = "obj";

HTH
March 2,
http://www.activewidgets.com/aw.system.html/setid.html

The id should contain only alphanumeric characters and start with a letter. The dot character is not allowed inside the id because it breaks css selector syntax.
Alex (ActiveWidgets)
March 2,
I need this id, i have some specific actions with filters and need know this id because one function have for example

eval('var temp = '+this.getId()+'.getHeaderText(col);');
Gustavo
March 3,
Hi Alex, have one question..

i change some lines in aw.js for example all
obj.getId() ==> obj._id
this.getId() ==> this._id

Example
e.setAttribute("id",originalNode?originalNode.id:obj.getId()+"-box-edit");
for
e.setAttribute("id",originalNode?originalNode.id:obj._id+"-box-edit");

and functions getId and setId

obj._idr="";
obj.getId=function(){
if(this._idr!=""){
return this._idr;
}else{
return this._id
};
};

obj.setId=function(id){
if(id.indexOf(".")!=-1){
this._idr=id;
id = id.replace(/\./g,"");
};
AW.all[this._id]=null;
this._id=id;
AW.all[this._id]=this;
resetHTMLCache(this);
};

i think this changes to aw.js fix me problem and dont make problems with Grid.


who do yuo think this change?
can make this change trouble?
Gustavo
March 3,

This topic is archived.

See also:


Back to support forum