Je développe une application basée sur la grille de données Advance. Dans cette grille, chaque colonne ajoute à l'aide du rendu d'élément et j'ai ajouté une case à cocher dans tout l'en-tête de colonne. Dans la grille, j'ai utilisé le fournisseur de données xml. Je crée xml en tant que chaîne et jette cette chaîne en xml. Lorsque je clique sur une cellule, il prend 10-13 sec et dans le gestionnaire de clic de cellule je reçois la valeur de System.totalMemory est 255205376.Mon application fonctionne très lentement
S'il vous plaît quelqu'un me suggère ce que je vais faire.
Merci
Mon Xml Code de mise en caisse
public function CreateDefaultXml(PojectionPeriod:int):XML{
var xmlstring:String="<root>";
xmlstring+="<row>" +
"<Itemname>Item</Itemname>" +
"<Unit>Unit</Unit>" +
"<Cases>Cases</Cases>" +
"<row>1</row>" ;
for(var i:int=0;i<PojectionPeriod;i++){
xmlstring+="<projection_"+i.toString()+">";
xmlstring+="<projectionTxt/>";
xmlstring+="<growthValue/>";
xmlstring+="<projectionFormula/>";
xmlstring+="<constantgrowth/>";
xmlstring+="<growthWith/>";
xmlstring+="<timeProjection/>";
xmlstring+="<formula/>";
xmlstring+="<IsError/>";
xmlstring+="<Image>l</Image>";
xmlstring+="<DisplayprojectionTxt/>";
xmlstring+="<Style>" +
"<FontColor></FontColor>"+
"<CellFill>0xffffff</CellFill>"+
"</Style>";
xmlstring+="<DecimalValue>0</DecimalValue>";
xmlstring+="</projection_"+i.toString()+">";
}
xmlstring+="<RowSelected>false</RowSelected>";
xmlstring+="<ItemNameStyle>" +
"<FontColor></FontColor>"+
"<CellFill></CellFill>" +
"</ItemNameStyle>" +
"<UnitStyle>" +
"<FontColor></FontColor>"+
"<CellFill></CellFill>" +
"</UnitStyle>"
"<CasesStyle>" +
"<FontColor></FontColor>"+
"<CellFill></CellFill>" +
"</CasesStyle>" ;
xmlstring+="</row>";
var headerxmlString:String="";
headerxmlString+="<header>" +
"<Setting>" +
"<Currency></Currency>" +
"<Period></Period>" +
"<NumberOfPeriod></NumberOfPeriod>" +
"<StartPeriod></StartPeriod>" +
"<PeriodFormat>" +
"<Sequence></Sequence>" +
"<Month></Month>" +
"<Year></Year>" +
"<Separators></Separators>" +
"<FontColor></FontColor>"+
"<CellFill>0xffffff</CellFill>"+
"</PeriodFormat>" +
"<NumberFormat>" +
"<Seperator></Seperator>" +
"<Negative></Negative>" +
"<HardCoded>" +
"<FontColor>0x000000</FontColor>"+
"<CellFill>0xffffff</CellFill>"+
"</HardCoded>" +
"<Calculated>" +
"<FontColor>0x000099</FontColor>"+
"<CellFill>0xfffe83</CellFill>"+
"</Calculated>" +
"<DecimalDigit>2</DecimalDigit>" +
"</NumberFormat>" +
"</Setting>"+
"<projectname/>";
headerxmlString+="<headerColumn>";
var headerArr:Array=new Array();
for(var j:int=0;j<int(GlobalVariables.GlobalVariables.ProjectionPeriod)+3;j++){
headerxmlString+="<column_"+i+">"
headerxmlString+=false
headerxmlString+="</column_"+i+">"
}
headerxmlString+="</headerColumn>"
headerxmlString+="</header>";
GlobalVariables.GlobalVariables.HeaderXMLs=XML(headerxmlString);
xmlstring+=headerxmlString;
xmlstring+="</root>";
return XML(xmlstring);
}
Pourriez-vous poster un peu de votre code? Cela pourrait nous aider à voir comment vous créez le XML. –