1
私は動的列を持つDataGridを持っています。列にはItemRendrerが含まれます。私はItemRendererを動的に追加することに慣れていません。
私のコードは次のとおりです。Flex DataGridの動的ItemRenderer
var column:DataGridColumn = new DataGridColumn();
column.headerText = item;
column.width=150;
column.dataField=item;
column.itemRenderer = WorkNatureRenderer ;
cols.push(column);
WorkNatureRenderer
は、MXMLコンポーネントである
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300">
<s:TextInput/>
<s:Button/>
</mx:HBox>
(Hbox
はTextInput
とButton
を含む)しかし、私はこれを追加するとき、私はエラーを得た1067: Implicit coercion of a value of type Class to an unrelated type mx.core:IFactory.
どれ例または。リンク..
は迅速reply..Itいただきありがとうございます、私はなかったClassFactory'として 'WorkNatureRendererを使用しようとしていた作業..小さなミスと思われます働いています... –
@MSNayakちょっとtats wokay男... wenそれは私に知らせてくれます...これはユニークな要件でした..私は同じ..仕事のために好奇心を持っていますcya!:-) – Aravinth