Skip navigation
claudio.rosati
Currently Being Moderated

Big DataGrid and ItemRenderers

Sep 5, 2012 6:52 AM

Tags: #datagrid #itemrender #rowcount

I've a "big problem".

 

A data grid with more than 200 rows witch has a rowCount="{dataProvider.length + 1}". The rowcount is evaluated in this way to have the datagrid show all his content without scroll bars so that the only scroll bar is at window level.

 

The problem is that the datagrid can't figure out witch rows are visible or not and so it instantiates the itemrenderers for all the rows (I know that generally it istantiates just the "rowcount" rows visible): this brings to an enormus amount of itemrenderes istantiated witch freeze the application and generate instability.

 

Is there a way to change this beahviour ?

 

Jus a note, I'm still working on Flex 3.6, but I think I would have the same problem with the newest releases.

 

 

Thanks

 
Replies
  • Currently Being Moderated
    Sep 5, 2012 1:43 PM   in reply to claudio.rosati

    If you set rowCount to the length of the dataProvider, it will definitely show all rows.  What did you expect it to do instead?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 6, 2012 9:04 AM   in reply to claudio.rosati

    You can set verticalScrollPolicy=”none” and size the DG to the size of the window.  Then add your own scrollbar on the window and have it control the verticalScrollPosition of the DG.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 6, 2012 9:48 AM   in reply to claudio.rosati

    You can set verticalScrollPolicy=”none” and size the DG to the size of the window.  Then add your own scrollbar on the window and have it control the verticalScrollPosition of the DG.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points