我已经用项目渲染器完成了分层数据网格。一切正常。我有很多数据要显示在网格中,所以每次加载数据时都会显示滚动条。拖动滚动条时,项目渲染器无法正常工作,并且缺少一些数据列数据。我知道如何解决这个问题吗?
在这里找到图片图片点击
请检查以下代码:- `width="100%" height="100%" textAlign="center" autoDrawBackground="false">
<fx:Script>
<![CDATA[
import com.hp.pmm.common.ImageLibrary;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.resources.ResourceManager;
private var _data:Object;
override public function set data(value:Object):void
{
super.data = value;
var showButton:String= '';
var i:int=0;
var j:int=0;
var showDataForChildren:String;
if(value.hasOwnProperty("Data_Transfer"))
{
showButton = value.Data_Transfer;
if (showButton == "Show_Button") {
startId.visible= true;
startId.includeInLayout= true;
abortId.visible= true;
abortId.includeInLayout= true;
imgStatus.visible=false;
lblStatus.visible= false;
imgStatus.includeInLayout= false;
lblStatus.includeInLayout= false;
}else {
lblStatus.text = "--";
startId.visible= false;
abortId.visible= false;
startId.includeInLayout= false;
abortId.includeInLayout= false;
imgStatus.includeInLayout= true;
lblStatus.includeInLayout= true;
}
}
}
public function clickedOnStart(event:Event):void{
var startEvent:Event = new Event("clickOnStartButton");
var parent:EventDispatcher = parentDocument.parentDocument as EventDispatcher;
if (parent != null)
{
parent.dispatchEvent(startEvent);
}
}
public function clickedOnAbort(event:Event):void{
var abortEvent:Event = new Event("clickOnAbortButton");
var parent:EventDispatcher = parentDocument.parentDocument as EventDispatcher;
if (parent != null)
{
parent.dispatchEvent(abortEvent);
}
}
]]>
</fx:Script>
<s:HGroup width="100%" gap="5" verticalAlign="middle" horizontalAlign="left" height="100%">
<!--<mx:Image id="imgStatus"/>
<mx:Label id="lblStatus" textAlign="left" showTruncationTip="true" paddingTop="3"/>-->
<s:HGroup verticalAlign="middle" horizontalAlign="center">
<mx:Button label="Start" id="startId" click="clickedOnStart(event)" width="40" height="20"/>
<mx:Button label="Abort" id="abortId" click="clickedOnAbort(event)" width="40" height="20"/>
</s:HGroup>
<s:HGroup height="100%">
<mx:Image id="imgStatus"/>
<mx:Label id="lblStatus" textAlign="left" showTruncationTip="true" paddingTop="3" />
</s:HGroup>
</s:HGroup>
`