0

I am using an mx:DataGrid with a dataProvider to display Rows. I have checked the no of rows in my array ( which is 8 ) and the no of rows in the dataGrid. They both match, however I always get an extra blank row at the end of my data grid. How can I remove this row?

Regards Aparna

Aparna
  • 71
  • 1
  • 9

3 Answers3

1

try this : How can I make datagrid height is equal to data content in Adobe Flex an example based on the answer I found there:

 <?xml version="1.0" encoding="utf-8"?>
  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:DataGrid x="31" y="157" id="dg" rowCount="{dg.dataProvider.length}">
 <mx:dataProvider>
    <mx:ArrayCollection>
        <mx:Object name="name1" date="25/11/2010" />
        <mx:Object name="name2" date="24/11/2010" />
        <mx:Object name="name3" date="23/11/2010" />
        </mx:ArrayCollection>
        </mx:dataProvider>
</mx:DataGrid>
</mx:Application>

One more thing ,dont specify the height of the grid explicitly in the mx:DataGrid tag.

Community
  • 1
  • 1
himanshu
  • 392
  • 3
  • 17
0

The new spark DataGrid control appears to solve this problem.

Toughy
  • 767
  • 6
  • 5
0

Keep changing the size of your data grid in the design view so that it must be able to accomodate only fixed number of rows. Keep scroll policy false.

Taryn
  • 242,637
  • 56
  • 362
  • 405
Flextron
  • 13
  • 3