TypeError: Error #1007:Instantiation attempted on a non-constructor.at mx.controls::AdvancedDataGridBaseEx/getSeparator()

이와 같은 에러가 발생하였을 경우..

Fix (add to CSS, this is the basics required for the most part ):

mx|AdvancedDataGrid{
columnDropIndicatorSkin: ClassReference("mx.skins.halo.DataGridColumnDropIndicator");
columnResizeSkin: ClassReference("mx.skins.halo.DataGridColumnResizeSkin");
headerColors: #FFFFFF, #E6E6E6;
headerDragProxyStyleName: "headerDragProxyStyle";
headerBackgroundSkin: ClassReference("mx.skins.halo.DataGridHeaderBackgroundSkin");
headerSeparatorSkin: ClassReference("mx.skins.halo.DataGridHeaderSeparator");
headerHorizontalSeparatorSkin: ClassReference("mx.skins.halo.AdvancedDataGridHeaderHorizontalSeparator");
headerStyleName: "advancedDataGridStyles";
sortArrowSkin: ClassReference("mx.skins.halo.DataGridSortArrow");
stretchCursor: Embed(source="Assets.swf",symbol="cursorStretch");
}
 
mx|AdvancedDataGridSortItemRenderer{
paddingTop: 0;
paddingBottom: 0;
paddingLeft: 0;
paddingRight: 0;
horizontalGap: 0;
color: #0B333C;
icon: ClassReference("mx.skins.halo.DataGridSortArrow");
}
 
mx|PrintAdvancedDataGrid{
alternatingItemColors: #FFFFFF, #FFFFFF;
borderColor: 0;
columnResizeSkin: ClassReference("mx.skins.halo.DataGridColumnResizeSkin");
headerColors: #FFFFFF, #FFFFFF;
headerSeparatorSkin: ClassReference("mx.skins.halo.DataGridHeaderSeparator");
headerStyleName: "advancedDataGridStyles";
horizontalGridLineColor: 0;
horizontalGridLines: true;
sortArrowSkin: ClassReference("mx.skins.halo.DataGridSortArrow");
stretchCursor: Embed(source="Assets.swf",symbol="cursorStretch");
verticalGridLineColor: #000000;
}
 
mx|PrintOLAPDataGrid{
alternatingItemColors: #FFFFFF, #FFFFFF;
borderColor: 0;
columnResizeSkin: ClassReference("mx.skins.halo.DataGridColumnResizeSkin");
headerColors: #FFFFFF, #FFFFFF;
headerSeparatorSkin: ClassReference("mx.skins.halo.DataGridHeaderSeparator");
headerStyleName: "advancedDataGridStyles";
horizontalGridLineColor: 0;
horizontalGridLines: true;
stretchCursor: Embed(source="Assets.swf",symbol="cursorStretch");
verticalGridLineColor: #000000;
}

 

이렇게 CSS에 추가해주면 된다. 

Posted by 미랭군