1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| private function addGrp ( group:Array, grpentete:String, champ1:String, champ2:String, aligne:String, color:Number, isStyle:Boolean ): void
{
var grp : AdvancedDataGridColumnGroup = new AdvancedDataGridColumnGroup();
var col1 : AdvancedDataGridColumn = new AdvancedDataGridColumn();
var col2 : AdvancedDataGridColumn = new AdvancedDataGridColumn();
grp.headerText = grpentete;
grp.editable = false;
grp.setStyle("textAlign", aligne);
grp.setStyle("fontSize", 14);
col1.dataField = champ1;
col1.headerText = "Client";
col1.editable = false;
col1.setStyle("fontSize", 10);
col1.setStyle("textAlign", aligne);
col1.setStyle("color", color);
if (isStyle == true)
{
col1.styleFunction = colIsWorking;
}
col1.itemRenderer = new ClassFactory(gridFormat);
col2.dataField = champ2;
col2.headerText = "Consommateur";
col2.editable = false;
col2.setStyle("fontSize", 10);
col2.setStyle("textAlign", aligne);
col2.setStyle("color", color);
if (isStyle == true)
{
col2.styleFunction = colIsWorking;
}
col2.itemRenderer = new ClassFactory(gridFormat);
grp.children = [col1, col2];
group.push( grp ) ;
} |
Partager