我目前正在尝试禁用selectable/editable /或将textInput更改为dynamic以获得我想要的结果.
我有一个带有下拉菜单和文本输入区域的自定义数据网格.但是,如果我的Model#列中没有数据,我不希望允许相应的PurchasePrice单元格中的任何条目.
col1 = new DataGridColumn("Model");
col1.headerText = "Model #";
c2.consumables_dg.addColumn(col1);
col1.width = 60;
col1.editable = false;
col1.sortable = false;
col1.cellRenderer = AlternatingRowColors_editNum_PurchasePrice;
col1 = new DataGridColumn("PurchasePrice");
col1.headerText = "Purchase Price";
c2.consumables_dg.addColumn(col1);
col1.width = 60;
col1.editable = false;
col1.sortable = false;
col1.cellRenderer = AlternatingRowColors_editNum_PurchasePrice;
Run Code Online (Sandbox Code Playgroud)
我已经尝试了AlternatingRowColors_editNum_PurchasePrice中的各种项目,但似乎没有任何工作.请看看我在if的其他声明中尝试了什么(__ enbaled)
package{
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
import fl.controls.TextInput;
import flash.text.TextFieldType;
import flash.events.Event;
import fl.controls.listClasses.ListData;
import fl.controls.listClasses.ICellRenderer;
public class AlternatingRowColors_editNum_PurchasePrice extends TextInput implements ICellRenderer
{
protected var _data:Object;
protected var _listData:ListData;
protected var _selected:Boolean;
private …Run Code Online (Sandbox Code Playgroud)