2 Replies Latest reply on Aug 20, 2010 4:06 AM by See Sam Jagan

    Text box in gridview


      I have to show empty text box in all the columns of my grid while lodading grid. Anyone please give me the source code for this. I am new to flex.


      Thanks & Regards


        • 1. Re: Text box in gridview



          when you say  grid, wat you mean by grid


          1] <mx:Grid>

          2] <mx:DataGrid>



          • 2. Re: Text box in gridview
            See Sam Jagan


            try to use ItemRenderer property of the DataGridColumn Control..


            and make sure you set the dataProvide property something like {[{},{}]} which will give you two empty rows with


            <mx:DataGrid width="100%" height="300" dataProvider="{[{}, {}]}">
                 <mx:DataGridColumn  itemRenderer="mx.controls.TextInput" headerText="Col1"/>
                 <mx:DataGridColumn itemRenderer="mx.controls.TextInput" headerText="Col2"/>
                 <mx:DataGridColumn itemRenderer="mx.controls.TextInput" headerText="Col3"/>


            or you can try this


                           import mx.collections.ArrayCollection;
                           public var rdp:Array = [{}, {}, {}];
                           public var cdp:Array = [{}, {}, {}, {}];
                      <mx:Repeater dataProvider="{rdp}">
                                <mx:Repeater dataProvider="{cdp}">
                                          <mx:TextInput text="" width="100%"/>


            good luck