Hi Vishal, Could you explain more on what you want to tell me ? Or can u give a sample example from where i can understand this ?
Thanks for ur reply.. Regards Ashish On Oct 11, 11:00 am, "vishal lad" <[EMAIL PROTECTED]> wrote: > You can also use Grid.Make a component GridRow as parent Componet.Inside > GridItem Tag add Textbox.<?xml version="1.0" encoding="utf-8"?> > <mx:GridRow xmlns:mx="http://www.adobe.com/2006/mxml" > creationComplete="init()" width="750" horizontalAlign="left"> > <mx:GridItem horizontalAlign="left" width="100%"> > <mx:HBox verticalAlign="middle" horizontalAlign="left" width="100%"> > <mx:ComboBox width="150"></mx:ComboBox> > <mx:ComboBox ></mx:ComboBox> > <mx:TextInput id="txtValue" width="150"></mx:TextInput> > </mx:HBox> > </mx:GridItem> > </mx:GridRow> > In the main file Add the code that is at below... > > public function addFilterRows():void > { > var r:Row = new Row();//Row is your compoent mentioned above > grid.addChildAt(r,gb);// grid is the Id of you Grid} > > //Remove Row. > public function removeFilterRow():void > { > gb--; > grid.removeChildAt(gb);} > > This way > <GridRow> > <GridRow> > On Fri, Oct 10, 2008 at 9:03 PM, AshishMishra <[EMAIL PROTECTED]>wrote: > > > > > Hi Friends, > > > on click on a button, I am adding n number or elements in a > > ArrayCollection (newAnswersSkins) on a click on button( AddRowsBtn) > > click. Now I am taking a number from a textInput (noOfAnswerSkin) and > > adding that many rows into the this ArrayCollection(newAnswersSkins). > > Now problem is that when user tries to add more rows, the previous > > rows data gets cleared. Can somebody, what is wrong herer? You can see > > the code here : > > > [Bindable] > > public var newAnswersSkins:ArrayCollection = new > > ArrayCollection(); > > > public function addRows():void{ > > var noOfAnswerSkins:int = parseInt(noOfAnswerSkin.text); > > for(var i:int =0; i<noOfAnswerSkins;i++){ > > newAnswersSkins.addItem({key:0, answerSkin:""}); > > } > > noOfAnswerSkin.text = "1"; > > } > > > <mx:NumberValidator source="{noOfAnswerSkin}" property="text" > > integerError="Please Enter Integer value" > > domain="int" trigger="{AddRowsBtn}" triggerEvent="click" > > valid="addRows();" > > invalidCharError="Please Enter A Valid Value"/> > > > <mx:VBox id="dataPrompt" horizontalScrollPolicy="off" height="100%"> > > <mx:HBox horizontalScrollPolicy="off" > > verticalScrollPolicy="off" horizontalGap="10"> > > <mx:Label width="40" text="Select"/> > > <mx:Label width="162" text="Standard Answer Skin"/> > > <mx:Label width="132" text="{stdAnswer}"/> > > <mx:Label width="132" text="Sequence"/> > > </mx:HBox> > > <mx:VBox id="newStdAnswerSkin" horizontalScrollPolicy="off"> > > <mx:Repeater id="stdNewAnswerRepeater" > > dataProvider="{newAnswersSkins}"> > > <mx:HBox horizontalScrollPolicy="off" > > horizontalGap="10"> > > <mx:CheckBox width="40" > > data="{stdNewAnswerRepeater.currentIndex}" > > click="setSequence(event)"/> > > <mx:TextInput id="newAnswerSkin" width="162" editable="true"/> > > <mx:TextInput id="newAnswer" width="132" editable="true"/> > > <mx:TextInput id="newAnswerSeq" width="132" text=""/> > > </mx:HBox> > > </mx:Repeater> > > </mx:VBox> > > <mx:HBox horizontalScrollPolicy="off" > > > <mx:Label text="Please add" /> > > <mx:TextInput id="noOfAnswerSkin" width="50" > > text="1"/> > > <mx:Label text=" new answer options."/> > > <mx:Button id="AddRowsBtn" label="Add Rows"/> > > </mx:HBox> > > </mx:VBox> > > > Thanks for ur replies in advance... > > > Regards, > > Ashish Mishra --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

