DataGrid reference is NULL after event was dispatched -


I'm a total flex novice and I struggle with the event model. I have the following scenario:

  • DataProvider is set to ArrayCollection
  • The data grid is a simple two-to-do list, checks in the first column as check junk
  • Other columns are plain strings

What I need to achieve is that after creating or starting a data grid, I have the color of the item renderers The style must be conditionally updated. The situation says, if the value of the property (stored in the data provider) is correct, then set the color of the text to gray.

The problem is that the item renders are initiated before the data grid is created, so the data grid reference that I can get in the item renderer is null. That's why I informed that the item renderer after data grid has been completed. The question is how to use the Flex Event Model.

It seems that the event items sent by the data grid were not heard by the renderer Please take a look at my code:

    m; DataGrade column datafilled = "done" header text = "!" & Gt; & lt; mx: itemRenderer & gt; & lt; mx: component & gt; & lt; c: change status checkbox = "this.onChange (event) ; />    

When I start my application and the data grid is created then the 'Update' event is triggered. However the update gate instance (DG) is used in the update styling function in the CustomLabel component. Why is it null now? As you can see in the init () method, the DG variable is not zero (the warning item goes for each example of the renderer)

Can you help me? Many thanks guys.

If you hear the dataChange event, it can trigger Handler


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -