PDA

View Full Version : Setting viewConfig in Sencha Architect 3



bevara.siva
10 Apr 2014, 10:57 PM
Hi,
We are using Sencha Architect 3 and ExtJs 4.2.2.

We wanted to use viewConfig section to set the tree grid colors based on the condition with the following code.



viewConfig: {
getRowClass: function (record) {
if (record.getDepth() === 1) {
return 'bg_TreeNodeLevel1';
}
else if (record.getDepth() === 2) {
return 'bg_TreeNodeLevel2';
}
else if (record.getDepth() === 3) {
return 'bg_TreeNodeLevel3';
}
else if (record.getDepth() === 4) {
return 'bg_TreeNodeLevel4';
}
}
}


But in the sencha Architect I didnt see a way to set this.

Please help!!

Regards,
SivaPrasad.B

scottmartin
11 Apr 2014, 4:43 AM
You can add any property you to Architect. Simply add as an object:


viewConfig: {}


And then click the -add- button to the right .. Then you are set.