Take KONtx.control.Grid for example, I want to change the grid's rows from 1 to 4,the following is the code, looks like this:
CODE
this.controls.grid = new KONtx.control.Grid({
id: "grid1",
rows: 1,
columns: 1,
styles: {
width: this.width,
height: this.width,
vOffset: this.height - this.width - this.controls.metadata.height - this.controls.pageindicator.height,
},
cellCreator: this.imageCellCreator,
cellUpdater: this.imageCellUpdater,
manageWaitIndicator: true,
}).appendTo(this);
var self = this;
this.controls['button'] = new KONtx.control.TextButton({
label: 'HelloADO',
styles: $merge($content.styles.main.button, {
vOffset: 0
}),
events: {
onSelect: function(event){
[b]
[i][u]self.controls.grid.rows = 4;
self.controls.grid.columns = 4;
self.updateView(); [/u][/i][/b]
}
}
}).appendTo(this);
The code is in the onSelect handlers function.
But it doesn't work.
Any friend can help me to solve the problem? Thanks.