can somebody help me?
let me explain more
My datagrid’s data is populated from parsing xml in it by xml con and dataset
In the Xml file i have afield ( student name)
And in flash i create a checkbox in taketime column of the datagrid, the dataset inspector schema has student name and taketime
and in the movieclip
import mx.controls.DataGrid;
// Build data provider for the data grid
myDP = new Array();
myDP.addItem({stdChname:"",TakeTime:false});
student_dg.dataProvider = myDP;
student_dg.getColumnAt(1).cellRenderer = "CheckBoxCell";
The cellrender code:
import mx.core.UIComponent;
import mx.controls.CheckBox;
class CheckBoxCell extends UIComponent {
private var check:MovieClip;
private var listOwner:MovieClip;
private var getCellIndex:Function;
function CheckBoxCell() {
}
private function createChildren():Void {
check = createObject("CheckBox", "check", 1, {styleName:this, owner:this});
check.addEventListener("click", this);
size();
}
private function size():Void {
check.setSize(__width, __height);
check._x = 0;
check._y = 0;
}
private function setValue(str:String, item:Object, sel:Boolean):Void {
check._visible = (item != undefined);
check.selected = item.selected;
check.label = item.label;
}
private function getPreferredHeight():Number {
return 16;
}
private function click() {
listOwner.dataProvider.editField(getCellIndex().itemIndex, "selected", check.selected);
listOwner.dataProvider.editField(getCellIndex().itemIndex, "label", **_root.clock.time**);
}
}
the bold text is what my problem, the i want to check the checkbox and that checkbox label will show the current time,
but now , the label of the checkbox displays undefined and the checkbox isnt allowing me to tick it