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

Custom AdvancedDataGrid header rendered even if they are not visible

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK Previous
    • None
    • mx: DataGrid
    • None
    • Affected OS(s): Windows
      Browser: Internet Explorer 8.x
      Language Found: English

    Description

      We are creating an AdvancedDataGrid with 120 columns but limited to 480 pixels (scrollbars are active).
      Each columns is created dynamically with custom header renderer.
      The problem is that header renderers are instanciated for columns which are not yet visible.
      On the exemple below, only 6 columns are displayed, the other columns are hidden (but accessible when scrolling) but the HeaderRenderer is created 120 times impacting the AdvancedDatagrid rendering time.

      Steps to reproduce:
      1. Download TestCase.mxml and CustomHeaderRenderer.as
      2. Run the "TestCase" in Debug mode
      3. click on "populate items"

      Actual Results:
      Check the trace to see that header renderers are created 120 times even if they are not displayed ! The rendering time takes about 2500ms on my PC.
      => 120 calls to CustomHeaderRenderer constructor.
      => 120 calls to measure, createChildren() and updateDisplayList()

      Expected Results:
      CustomHeaderRenderer should be limited and created only for the number of visible columns.
      In the TestCase, I'd expect only 6 calls to CustomheaderRenderer constructor.
      Limiting the creation of visible columns should impacts the performance and lower the rendering time of the AdvancedDataGrid.

      Workaround (if any):
      none.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: