Here is another example of this problem.

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
xmlns:local="*" height="100%" width="100%">

<mx:Script>
<![CDATA[

[Bindable]
public var myDP:Array = [
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"},
{Name: "John Doe", Photo: "john_doe.jpg", Phone: "555-55-55"}
]
]]>
</mx:Script>

<mx:DataGrid id="myDG" dataProvider="{myDP}" width="500" 
height="355">
<mx:columns>
<mx:DataGridColumn dataField="Name"/>
<mx:DataGridColumn dataField="Photo"/>
<mx:DataGridColumn dataField="Phone" 
itemRenderer="mx.controls.Label"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>

The problem happends when the hight of the grid is multipe of the 
hight of the row.
In this example hight of the grid is 355.
Hight of the header is 25
hight of the row is 22

So we have (355-25)/22 = 15
Exactly 15 rows.
And we see 16's row show up outside of the grid.
If we put hight of the grid 356 (not multiple of row hight), extra 
row is not shown.

Thank you.

 
--- In flexcoders@yahoogroups.com, "valery_j" <[EMAIL PROTECTED]> wrote:
>
> I have a problem with ItemRenderer in Datagrid.
> The following code was taken from the help and modifed slightly
> 
> /---------
> 
> <?xml version="1.0"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
>     
>     <mx:Script>
>         <![CDATA[
>             [Bindable]
>             public var initDG:Array = [
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'},
>                 {Artist:'Pavement', Album:'Slanted and Enchanted', 
> Price:11.99, Cover: 'file.png'},
>                 {Artist:'Pavement', Album:'Brighten the Corners', 
> Price:11.99, Cover: 'folder.png'}
>             ];
>         ]]>
>     </mx:Script>
>  <mx:VDividedBox width="100%" height="100%">
>      <mx:DataGrid id="myGrid" dataProvider="{initDG}" 
rowHeight="25" 
> height="100%" width="100%">
>          <mx:columns>
>              <mx:DataGridColumn dataField="Artist"/>
>              <mx:DataGridColumn dataField="Album"/>
>              <mx:DataGridColumn dataField="Cover">
>                  <mx:itemRenderer>
>                      <mx:Component>
>                          <mx:Image height="14" width="14"/>
>                      </mx:Component>
>                  </mx:itemRenderer>
>              </mx:DataGridColumn> 
>              <mx:DataGridColumn dataField="Price"/>
>          </mx:columns>        
>      </mx:DataGrid>         
>   <mx:Panel width="100%">
>    <mx:HBox width="100%" paddingBottom="5" paddingLeft="5" 
> paddingRight="5" paddingTop="5">
>     <mx:Spacer width="100%"/>
>     <mx:Button label="Button1"/>
>     <mx:Button label="Button2"/>
>     <mx:Button label="Button3"/>
>     <mx:Button label="Button4"/>
>    </mx:HBox>
>   </mx:Panel>
>  </mx:VDividedBox>
> </mx:Application>
> 
> /-----------
> 
> Compiled version you can look here: 
> http://test.affilia.com/FlexFtp/bug/test.html
> 
> If you will try to vertical resize browser window (slow) - you can 
> see one extra row under the grid. Between bottom panel and grid. 
> Anyone can help me to resolve this problem? 
> It happens with custom item renederer only.
> 
> Thank you.
>


Reply via email to