2 Replies Latest reply on Aug 23, 2011 9:16 AM by Flex harUI

    Inline itemrenderer in datagridcolumn: migrating from mx:HBox to s:HGroup

    martinjconnolly Level 1

      Hi All,

      I have an item renderer for a datagridcolumn which is defined inline (because of the problem of reusing data with a separately defined component).

      That item renderer has an mx:HBox containing some text, a text input and a button. I set all of those items' visibility by checking the value of another datafield using the "data" property.

      For example:


      <mx:DataGridColumn dataField="hoursEntered" headerText="Hours charged" editable="false" >
                                      <mx:HBox height="50"  bottom="2" left="2" right="2" top="2" >


                                          <s:Label id="lblData" text="{lazyHours(data.hoursEntered)}"
                                                   left="0" top="0" width="31" height="23" verticalAlign="middle" textAlign="center" color="#264DF3"
                                                   fontWeight="bold" visible="{checkChargeable(data.type)}" />




      I'm shortly moving from FB4 to FB4.5 and I keep seeing warnings that I should use an s:HGroup instead of the mx:HBox. If I do that the"data" variable is no longer valid. What's the equivalent property that I should use instead? Or will the Spark DataGrid have yet another way to do the item renderer?