title: Setting the AdvancedDataGrid's row height while AdvancedDataGridRendererProvider rendering
body: <p>Flex Guys,</p>
  
  <p>Not able to setting height of row in AdvancedDataGrid using custom AdvancedDataGridRendererProvider datagrid renderer.</p>
  
  <p>Snapcode as here </p>
  
  <pre><code>&lt;mx:AdvancedDataGrid id="docId" 
                                       visible="true"
                                       width="100%" height="100%"
                                       dataProvider="{data}" 
                                       horizontalScrollPolicy="on"
                                       verticalScrollPolicy="on"
                                       styleName="MyStyle"
                                       styleFunction="getRowColours" 
                                       headerStyleName="MyStyle2"
                                       &gt;
                      &lt;mx:columns&gt;
                          &lt;mx:AdvancedDataGridColumn id="Name" dataField="name" 
                                                     headerText="Name" /&gt; 
                          &lt;mx:AdvancedDataGridColumn id="Value" dataField="values" 
                                                     headerText="Value" 
                                                     editable="true" /&gt;
                      &lt;/mx:columns&gt;
                      &lt;mx:rendererProviders&gt;
                          &lt;mx:AdvancedDataGridRendererProvider  id="DocID2"
                                                                columnIndex="1" columnSpan="1"
                                                                renderer="{new ClassFactory(MyRenderer)}" /&gt;
                      &lt;/mx:rendererProviders&gt;
                  &lt;/mx:AdvancedDataGrid&gt;
  </code></pre>
  
  <p>Please do let me know ..how should i handle it ..</p>
  
  <p>I tried with below code </p>
  
  <p>Set variableRowHeight=true for your DataGrid
  and then, inside your rednrerer adjust measuredHeight at run time
  But i should not set measuredHeight  in percentage .</p>
  
  <p>Thanks in advance.
  java</p>
  
  <p>I reworked on it and working code as below code ADG and renderer too</p>
  
  
  
  <pre><code>&lt;mx:AdvancedDataGrid id="adg" dataProvider="{input}" height="350" variableRowHeight="true" &gt;
          &lt;mx:columns&gt;
              &lt;mx:AdvancedDataGridColumn dataField="company" headerText="Company"/&gt;
              &lt;mx:AdvancedDataGridColumn dataField="product" headerText="Product"/&gt;
          &lt;/mx:columns&gt;
          &lt;mx:rendererProviders&gt;
              &lt;mx:AdvancedDataGridRendererProvider  id="myDataGridRenderer"
                                                    columnIndex="1" columnSpan="1"
                                                    renderer="{new ClassFactory(DataGridRowTestRenderer)}" /&gt;
          &lt;/mx:rendererProviders&gt;
      &lt;/mx:AdvancedDataGrid&gt;
  </code></pre>
  
  <p>
  
  
      
  
  <pre><code>    import spark.components.Label;
      import spark.components.TextArea;
  
      private var label1:Label;
      private var textArea1:TextArea;
      private var index:int;
  
      override public function set data(object:Object):void {
          super.data = object;
  
          this.removeAllElements();
  
          label1 = new Label();
          label1.text = object.company;
  
          this.addElement(label1);
  
          var textArea:TextArea = new TextArea();
          //textArea.text = object.product;
          //textArea.heightInLines = 2;
  
          index = object.index as int;
  
          textArea.heightInLines = index+1;
  
          textArea.text = object.product;
          /* if((index%2) == 0){
              textArea.heightInLines = 2;
          }else{
              textArea.heightInLines = 4;
          } */
          this.addElement(textArea);
      }
  
      override public function validateDisplayList():void{
          super.validateDisplayList();
      }
  
  ]]&gt;
  </code></pre>
  
  <p>
  </p>