Hi Roshan, I think the code that you have pasted is not an independent application ... It has some dependency with your code base (For E.g : Class Named "SCIUpdated" ). and hence am ot able to execute and see what happens ...
Anyways... Here are my suggestions..... Since your renderer has logic for enable and disable check box, There could be some miscalculations here ... to confirm this when you scroll, Print the Data and see whether the data is changed ..... if yes , then problem is with your Data Handling.. if not then the problem is in your 'Paint Logic" .... Once we confirm that, we can find the appropriate solution ...... Also, If possible, try making an independent application where you can execute and see the problem and mail us . In that case, we will be able to help you better ... -Sathish On Mon, Nov 17, 2008 at 6:39 PM, Roshan Pillai <[EMAIL PROTECTED]>wrote: > <?xml version="1.0" encoding="utf-8"?> > <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" > horizontalScrollPolicy="off" horizontalAlign="center" > creationComplete="chek_Unchek()"> > > <mx:Script> > <![CDATA[ > import mx.core.Application; > > import mx.controls.Alert; > import mx.collections.*; > import flash.events.Event; > > > > public var tmpVarSCI:SCIUpdated = SCIUpdated(Application.application); > > public function chek_Unchek():void > { > if(tmpVarSCI.cols == tmpVarSCI.arrcols.length -2) > tmpVarSCI.cols = 0; > > var temArr:Array = getVal(tmpVarSCI.cols + 1); > tmpVarSCI.cols++; > > chkBoxes.selected = data[temArr[0]]; > if(data.children==null) > { > chkBoxes.enabled=true; > } > else > { > chkBoxes.enabled=false; > } > chkBoxes.selectedField = temArr[1]; > > } > private function getVal(i:int):Array > { > for(var ctr:int = 0; ctr < tmpVarSCI.arrcols.length; ctr++) > { > if(ctr == i) > { > var tempstr:String = tmpVarSCI.arrcols[ctr].dataField.toString(); > var temparr:Array = tempstr.split("~"); > return temparr; > } > } > return null; > } > > private function updateSubscriptionArray(ev:Event):void > { > > var AccId:String = ev.currentTarget.parent.data.Parent; > var ProdId:String = ev.currentTarget.selectedField; > var OppId:String = tmpVarSCI.ArrOppRecords[0].Id; > if(ev.currentTarget.selected) > { > > tmpVarSCI.ArrSaveSubscription.addItem({AccountId:ev.currentTarget.parent.data.Parent, > ProductId:ev.currentTarget.selectedField, > OppId:tmpVarSCI.ArrOppRecords[0].Id}); > } > else > { > RemoveExistingRecord(AccId, ProdId, OppId); > } > } > private function RemoveExistingRecord(AccId:String, ProdId:String, > OppId:String):void > { > var isOk:Boolean = false; > for(var i:int = 0; i < tmpVarSCI.ArrSaveSubscription.length; i++) > { > if(tmpVarSCI.ArrSaveSubscription[i].AccountId == AccId && > tmpVarSCI.ArrSaveSubscription[i].ProductId == ProdId && > tmpVarSCI.ArrSaveSubscription[i].OppId == OppId ) > { > tmpVarSCI.ArrSaveSubscription.removeItemAt(i); > isOk = true; > break; > } > } > if(!isOk) > { > for(var i:int = 0; tmpVarSCI.arrPriceBookEntry.length; i++) > { > if(AccId == tmpVarSCI.arrPriceBookEntry[i].Account__c && ProdId == > tmpVarSCI.arrPriceBookEntry[i].Product__c && OppId == > tmpVarSCI.arrPriceBookEntry[i].Opportunity__c) > { > > tmpVarSCI.ArrDeleteSubscription.addItem({Id:tmpVarSCI.arrPriceBookEntry[i].Id}); > break; > } > } > } > tmpVarSCI.ArrSaveSubscription.refresh(); > } > ]]> > </mx:Script> > > <mx:CheckBox id="chkBoxes" click="updateSubscriptionArray(event);" /> > > </mx:VBox> > > > On Mon, Nov 17, 2008 at 6:36 PM, Vinod M. Jacob <[EMAIL PROTECTED]>wrote: > >> Would you paste your sample code? >> >> On Mon, Nov 17, 2008 at 5:59 PM, sheetal nilwant < >> [EMAIL PROTECTED]> wrote: >> >>> Hi, >>> can u pls elaborate the prob. >>> what do u mean by changing.Or plz paste the code snippet. >>> >>> >>> On Mon, Nov 17, 2008 at 5:44 PM, [EMAIL PROTECTED] < >>> [EMAIL PROTECTED]> wrote: >>> >>>> >>>> HI , >>>> >>>> I am creating columns dynamically into Advanced Datagrid and >>>> rendering Checboxes in each cell of each column. >>>> >>>> The problem i am facing is when i scroll the advanced datagrid the >>>> values of checkboxes which are checked are changing. >>>> >>>> Please i m stuck with this part ..... Kindly help me out ASAP. >>>> >>>> >>>> >>> >>> > > > > -- Warm Regards, Sathish Kumar T --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

