1 pièce(s) jointe(s)
TextInput dans AdvancedDataGrid - un carré apparait lors du clique sur le textInput
J'ai un AdvancedDataGrid, avec des TextInput dans chaque ligne. j'ai un problème, lorsque je veux saisir dans le champ un carré bleu apparait (voir piece jointe . que faut-il faire, pour faire disparaitre ce carré? Je vous remercie d'avance.
le code :
Code:
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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
| <mx:AdvancedDataGrid id="autreActiviteDg"
width="100%"
height="100%"
resizableColumns="true"
draggableColumns="false"
sortExpertMode="false"
editable="true"
creationComplete="familleGroup.refresh()"
defaultLeafIcon="{null}"
sortableColumns="false">
<mx:dataProvider>
<mx:GroupingCollection id="familleGroup"
source="{_model.listAutresActivites}">
<mx:Grouping>
<mx:GroupingField name="libelleFamille"/>
<mx:GroupingField name="libelleSousFamille"/>
</mx:Grouping>
</mx:GroupingCollection>
</mx:dataProvider>
<mx:columns>
<mx:AdvancedDataGridColumn dataField=""
headerText="Famille / Sous-Famille"
width="200" editable="false">
<mx:itemEditor>
<mx:Component>
<mx:TextInput text="{data.libelleFamille}"/>
</mx:Component>
</mx:itemEditor>
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn dataField="libelleActivite"
headerText="Libellé Activité"
width="130">
<mx:itemEditor>
<mx:Component>
<mx:TextInput text="{data.libelleActivite}"
enabled="{data.habilitationOrig == 2}"
maxChars="50"/>
</mx:Component>
</mx:itemEditor>
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn dataField="codeImputationElec"
headerText="Imputation E"
width="130"
headerWordWrap="true">
<mx:itemEditor>
<mx:Component>
<mx:TextInput width="100%"
height="100%"
text="{data.codeImputationElec}"
maxChars="24"/>
</mx:Component>
</mx:itemEditor>
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn dataField="codeImputationGaz"
headerText="Imputation G"
width="130"
headerWordWrap="true">
<mx:itemEditor>
<mx:Component>
<mx:TextInput text="{data.codeImputationGaz}"
maxChars="24"/>
</mx:Component>
</mx:itemEditor>
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn dataField="pctGaz"
headerText="% Gaz"
width="70"
rendererIsEditor="true"
editorDataField="result"
itemRenderer="fr.edfgdf.pictrel.gta.renderer.PctGazNumericStepper"/>
<mx:AdvancedDataGridColumn editable="false"
width="10"
dataField="libelleSousFamille"
headerText="">
<mx:itemRenderer>
<mx:Component>
<mx:Button icon="{data.libelleSousFamille == null ? null : outerDocument.addIcon}"
click="outerDocument.addRow(data)">
<mx:Script>
<![CDATA[
override protected function commitProperties():void
{
super.commitProperties()
this.styleName="controlsButton";
}
]]>
</mx:Script>
</mx:Button>
</mx:Component>
</mx:itemRenderer>
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn editable="false"
width="10"
dataField="libelleSousFamille"
headerText="">
<mx:itemRenderer>
<mx:Component>
<mx:Button icon="{!( data.libelleSousFamille == null || data.autreActiviteIdDto.habilitation == 1) ? outerDocument.removeIcon : null}"
click="outerDocument.removeData(event, data)">
<mx:Script>
<![CDATA[
override protected function commitProperties():void
{
super.commitProperties();
this.styleName="controlsButton";
}
]]>
</mx:Script>
</mx:Button>
</mx:Component>
</mx:itemRenderer>
</mx:AdvancedDataGridColumn>
<!-- Il faut obligatoirement mettre la dataField, même si on s'en sert pas - j'ai mis libelleSousFamille d'une manière arbitraire -->
<mx:AdvancedDataGridColumn dataField="libelleSousFamille"
editable="false"
width="30"
headerText="">
<mx:itemRenderer>
<mx:Component>
<mx:Button icon="{data.libelleSousFamille == null ? null : outerDocument.validerIcon}"
click="outerDocument.saveData(data)">
<mx:Script>
<![CDATA[
override protected function commitProperties():void
{
super.commitProperties();
this.styleName="controlsButton";
}
]]>
</mx:Script>
</mx:Button>
</mx:Component>
</mx:itemRenderer>
</mx:AdvancedDataGridColumn>
</mx:columns>
</mx:AdvancedDataGrid>
</mx:VBox> |