Skip to main content
Participant
June 9, 2009
Question

Problem with AdvanceDataGrid

  • June 9, 2009
  • 1 reply
  • 876 views

I am facing problems using AdvanceDataGrid (ADG) as Tree and using itemRenderers.

I want a grid something like this.

To get the checkbox in the ADG, I have used <mx:rendererProviders>

<mx:rendererProviders>

<mx:AdvancedDataGridRendererProvider columnIndex = "1"

dataField = "

mailType" renderer = "com.jpmorgan.bds.dashboard.rephierarchy.view.renderer.CheckBoxADG"/>

</mx:rendererProviders>

The code for CheckBoxADG is as under:

<?xml version="1.0" encoding="utf-8"?>

<mx:Canvas

xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"

>

<mx:Script>

<![CDATA[

private function setData():void

{

if(data.creationCompleteFlag==false

) {

checkBox.selected = data.mailType;

data.creationCompleteFlag =

true

;

}

}

private function changeListData(event:Event):void

{

data.mailType = event.target.selected;

}

]]>

</mx:Script>

<mx:CheckBox id="checkBox

"

styleName="

morcomCheckBox

"

creationComplete="setData()"

change="changeListData(event)"

/>

NOW THE ISSUE:

When I scroll down and then back up again, The data of the checkbox changes. I know why that happens. The creationComplete event is called again when I scroll down (even though the checkboxes are created/rendered). I have no idea why ADG is behaving in this strange way. I am not sure why it is firing a creation complete event when it has already been rendered.

Another funny thing that I have noticed is that - If I scroll down the list very slowly, the creationComplete event does not get fired.

It would be very helpful if someone help me. Or someone from Adobe can explain me this problem.

Thanks in advance for help.

This topic has been closed for replies.

1 reply

MaazHAuthor
Participant
June 9, 2009

FYI, For the above I am using Flex SDK 3.2. I was having lot of other errors using an ADG with Flex SDK 3.0

Anyone trying to use ADG and have come accross some issue. I would advice you to get a Flex SDK 3.2.

Please help me with the problem of my first post.