I have checkboxes in a datagrid, the problem is when I uncheck the
box and click the update button the corisponding datagrid doesnt
update/filter the unchecked data. Help is greatly appreciated. here
is a block of the code:
(State Click is the click function for the datagrid which contains
the states and checkboxes, the Update is the function for the update
button)
private function StateClick():void
{
var Selected:Object;
var ChkState:Object;
Selected = dgStates.selectedItems;
if(Selected.InGraph == true ){
Selected.InGraph = false;
} else {
Selected.InGraph = true ;
}
}
private function Update():void
{
var i:int;
var ChkList:Array;
var Statelst:Object;
var check:Boolean;
var state:String;
var CheckObj :Object;
var StateCnt:int;
var cnt:int;
cnt=0;
StateCnt = 1;
ChkList = new Array(AllData.length);
state = AllData[0].state;
for (i=0;i< AllData.length;i++)
{
CheckObj = AllData[i];
if ( state == CheckObj.state)
{
StateCnt++;
}
else
{
ChkList[cnt] = {state:state,
total:StateCnt, InGraph:true};
cnt++;
state = CheckObj.state
StateCnt = 1;
}
}
ChkList.splice(cnt);
Statelst = StateListData;
for (i=0; i<Statelst.length; i++)
{
var Ro:Object;
var states:String;
var selected:Boolean;
Ro=Statelst[i];
if (Ro.length!=0)
{
selected = Ro.InGraph;
states = Ro.state;
for (var y:int=0; y<Statelst.length;
y++)
{
if ((SeminarListData
[y].State ==states) && (selected==false))
{
SeminarListData.splice(y,1);
}
}
}
else break;
}
}
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/