Accessing advanced datagrid individual cell editors to enable disable.
hi,
i did search on , not find relevant post.
private function processprimarygroup():void {
for (var i:uint = 0; < _xsitegroup.length; i++) {//run through array collection make changes
if (_xsitegroup[i].groupid == primarygroupdropdown.selecteditem.data) { //if select combo box select item matches array loop
_xsitegroup[i].selected = true; //change array collection settings
_xsitegroup[i].isradio = true;
_xsitegroup[i].preselected = true;
groupgrid.selectedindex = i; //select grid user can see change them
//now create new class factory check box
var mycheckbox:classfactory = new classfactory(checkbox);
mycheckbox.properties = {enabled:false};
//this problem
//this affects entire column, want disable checkbox in cell.
advanceddatagridcolumngroup(groupgrid.groupedcolumns[2]).children[0].itemrenderer = mycheckbox;
} else {
_xsitegroup[i].isradio = false;
}
}
mycheckbox.properties = {enabled:false};
//this works, sets entire column check boxes not editable
advanceddatagridcolumngroup(groupgrid.groupedcolumns[2]).children[1].itemrenderer = mycheckbox;
advanceddatagridcolumngroup(groupgrid.groupedcolumns[2]).children[1].editable = false;
you should change data in dataprovider collection, , reflected in ui.
sometimes need use mycheckbox.selected = (data.enabled == 'true' ? true : false) because data strings, , can't cast boolean.
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment