Skip navigation
Currently Being Moderated

Help with Datagrid Column Creation

Oct 21, 2011 1:28 PM

Tags: #default #spark #datagrid #creation #datagrid_columns #column #flex_4.5 #dataprovider

I'm trying to get a better understanding of how the Spark DataGrid component works so that I can create and extended version for one of my projects. One of the things that really has me stumped is how the datagrid sets up the columns based on the dataprovider when no explicit columns are defined. I've been able to debug through the datagrid initialization up to the point where the setter for dataprovider gets called. At that point my debug trace goes 'down the rabbit hole' so to speak, and when it comes back the columns are initialized but I can't figure out how. Could someone please point me to the Class/function that is actually responsible for creating the columns from the dataprovider if they are not defined explicitly?

 
Replies
  • Currently Being Moderated
    Oct 24, 2011 11:21 AM   in reply to bucpatr1

    So, as you've discovered, the private Grid/generateColumns() method is called if the columns list is still null at commitPropertes() time.   Subsequent changes to the columns property, even as a consequence of binding, should update the colums list as expected.

     

    Could you create an example that demonstrates the problem you've run into?   I'd be happy to look at it.

     

    - Hans

     
    |
    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