3 Replies Latest reply on Aug 27, 2012 6:15 AM by sravansss

    Which is the best way to solve this scenario

    sravansss

      Untitled.png

       

      Hi all I am very new to flex ,just know some basics only please give me your valuable suggestion on below mentioned quires.

       

      1. how to bulid this kind of layout in flex ??

      (I used data grid and itemrender but the buttons and combox are not comming direclty is it require any action to display them in data grid ??

       

      2. how to fix the size of a button in data grid ?

       

      Please help me on this ...

       

      Thanks

      ksk

        • 1. Re: Which is the best way to solve this scenario
          sravansss Level 1

          guys ...Please reply to this post...    

          • 2. Re: Which is the best way to solve this scenario
            Claudiu Ursica Level 4

            You could go for a list/data group with a custom item renderer. the buttons could be an a different state which you can change to based on some piece of data. You can share more info on what you need to do perhaps I can do better.

             

            C

            • 3. Re: Which is the best way to solve this scenario
              sravansss Level 1

              Thanks for the suggestion .. I have used the datagrid for that layout. for placing a buttons i have used the Hbox layout .. now everything is cmng in propermanner .. thank u once again ...

               

              one more query :

               

              how to call a function from itemrenderer ??

              here is my code :

               

               

              <mx:DataGrid  x="141" y="129" id="dg" dataProvider="{dgdp1}" height="112" >

                      <mx:columns>

                          <mx:DataGridColumn headerText="Column 1" dataField="col1"/>

                          <mx:DataGridColumn headerText="Column 2" dataField="col2"/>

                          <mx:DataGridColumn headerText="Column 3" dataField="col3"/>

                          <mx:DataGridColumn headerText="Column 4" dataField="col4">

                          <mx:itemRenderer>

                                    <mx:Component>

                                                      <mx:HBox>

                         

                                              <mx:Button label="+" click="outerDocument." />

                                              <mx:Button label="-" />

                                    </mx:HBox>

                         

                                    </mx:Component>

                          </mx:itemRenderer>

                          </mx:DataGridColumn>

                      </mx:columns>

                  </mx:DataGrid>

               

               

              I have a one function(xyz) in script .

               

              can you please tell me how to call that xyz function from  itemrender ???