Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-9104

rowCount on DataGrid doesn't work properly

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • Adobe Flex SDK 2.0 (Release)
    • mx: DataGrid
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows XP
      Language Found: English

    Description

      I set the rowCount property on a DataGrid to 5 and it displays only 4 rows. I tried with 6 and it displayed only 5... so it is always one less.

      I can send a screenshot to prove it.

      //Please run the following code
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="600" height="600" xmlns="*" >
      <mx:Script>
      import mx.collections.*;

      import mx.controls.listClasses.*;
      import mx.controls.DateField;

      private var catalog:ArrayCollection;
      private static var date1:Date = new Date(new Date().getFullYear(),new Date().getMonth(),5);
      private static var date2:Date = new Date(2006,0,15);
      private static var date3:Date = new Date(2004,9,24);

      private static var contacts1:Array = [

      {confirmed: date1, Location: "Spain"}

      ,

      {confirmed: date2, Location: "Italy"}

      ,

      {confirmed: date3, Location: "Bora Bora"}

      ,

      {confirmed: date1, Location: "Vietnam"}

      ];
      private function initCatalog(cat:Array):void

      { catalog = new ArrayCollection(cat); myDatagrid.dataProvider = catalog; }

      </mx:Script>

      <mx:Label text="itemRenderer - CheckBox Subclass" />
      <mx:Text text="Directions: Click in any of the cells in the second column. You should be able to edit the values with a CheckBox." width="350"/>
      <mx:DataGrid id="myDatagrid" variableRowHeight="true" editable="true" creationComplete="initCatalog(contacts1)" rowCount="4">
      <mx:columns>
      <mx:Array>
      <mx:DataGridColumn dataField="Location"/>
      <mx:DataGridColumn dataField="confirmed" editable="true" itemEditor="mx.controls.DateField" editorDataField="selectedDate" />
      </mx:Array>
      </mx:columns>
      </mx:DataGrid>

      </mx:Application>

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment