0 Replies Latest reply on Mar 26, 2010 12:13 AM by Santanu Karar

    Trouble in with first column itemRenderer

    Santanu Karar Level 1

      Hi,

       

      I'm having an AdvancedDataGrid generated through actionscripts, but can not assign an itemRenderer specifically for the first column. Following are the generation code excerpts.

       

       

      var tmpColumnAC : ArrayCollection = aReportVO.showOrderAC; // Holds the properties to be created columns in the ADG

      var cols : Array = new Array();;

      var dgc : AdvancedDataGridColumn;

                 

      advancedDG = new RowColorAdvancedDataGrid(); // Simple extended copy from ADG

      advancedDG.styleName = "shDataGrid";

      advancedDG.setStyle( "folderClosedIcon", null );

      advancedDG.setStyle( "folderOpenIcon", null );

      advancedDG.displayDisclosureIcon = false;

                 

      for ( var i:String in tmpColumnAC ) {

                 

                  var tmpDgcVO : DatagridColumnVO = tmpColumnAC[ i ];

                  dgc = new AdvancedDataGridColumn( tmpDgcVO.columnField );

                  dgc.width = tmpDgcVO.minWidth;

                  dgc.headerText = tmpDgcVO.columnName;

                  dgc.wordWrap = true;

                  dgc.headerWordWrap = true;

                  dgc.headerRenderer = new ClassFactory( ADGridHeaderRenderer );

                  if ( tmpDgcVO.isFirstColumn ) dgc.itemRenderer = new ClassFactory( SHRowSelection ); // SHRowSelection is a simple VBox component

                  cols.push( dgc );

       

      }

                 

      var tmpDP : HierarchicalData = new HierarchicalData( someArrayCollection );

      tmpDP.childrenField = "children";

                     

      advancedDG.columns = cols;

      advancedDG.dataProvider = tmpDP;

      advancedDG.draggableColumns = false;

      advancedDG.percentHeight = 100;

      advancedDG.variableRowHeight = true;

      advancedDG.displayItemsExpanded = true;

      vbListHolder.addChild( advancedDG );

       

       

       

      Thanks..

       

      ASB