remco-v
04-25-2005, 01:37 PM
Hey ive got a funny lil prob here.
I applied a nice cellrendere to my datagrid column 0.
This adds 2 nice things to the column
1 checkbox
1 colored ball to indicate the checkbox state.
Now i am having probs keeping the states in line with the value that is inside the datagrid. When the number of items <= vieuwable items count all works like it should be. but as soon as i place more items than the number of viewable items the last item is giving probs.
It cant be checked
1 extra item is added that sometimes dissapearce.
This is my function that keeps the states in line with the values.
//--------------------------------------------------------------------
function updateGrid()
{
var list = this._parent._parent._parent;
trace("=====================================");
for(var id =0; id <list.length; id++)
{
var nr = 10 + id;
if(list.getItemAt(id)['Correct'] == true)
{
trace("true " + 'listRow' + nr);
list['content_mc']['listRow' + nr]['fCell0'].redBall._visible = false;
list['content_mc']['listRow' + nr]['fCell0'].greenBall._visible = true;
list['content_mc']['listRow' + nr]['fCell0'].correct.selected = true;
}
else
{
trace("false");
list['content_mc']['listRow' + nr]['fCell0'].redBall._visible = true;
list['content_mc']['listRow' + nr]['fCell0'].greenBall._visible = false;
list['content_mc']['listRow' + nr]['fCell0'].correct.selected = false;
}
}
}
Anyone have an idea what is the prob?
I applied a nice cellrendere to my datagrid column 0.
This adds 2 nice things to the column
1 checkbox
1 colored ball to indicate the checkbox state.
Now i am having probs keeping the states in line with the value that is inside the datagrid. When the number of items <= vieuwable items count all works like it should be. but as soon as i place more items than the number of viewable items the last item is giving probs.
It cant be checked
1 extra item is added that sometimes dissapearce.
This is my function that keeps the states in line with the values.
//--------------------------------------------------------------------
function updateGrid()
{
var list = this._parent._parent._parent;
trace("=====================================");
for(var id =0; id <list.length; id++)
{
var nr = 10 + id;
if(list.getItemAt(id)['Correct'] == true)
{
trace("true " + 'listRow' + nr);
list['content_mc']['listRow' + nr]['fCell0'].redBall._visible = false;
list['content_mc']['listRow' + nr]['fCell0'].greenBall._visible = true;
list['content_mc']['listRow' + nr]['fCell0'].correct.selected = true;
}
else
{
trace("false");
list['content_mc']['listRow' + nr]['fCell0'].redBall._visible = true;
list['content_mc']['listRow' + nr]['fCell0'].greenBall._visible = false;
list['content_mc']['listRow' + nr]['fCell0'].correct.selected = false;
}
}
}
Anyone have an idea what is the prob?