The problems are centered on DataGridView.as and DataGridView.as
In DataGridColumn the Event import is needed and in DataGridView you must 
indicate that the style step is only for JS (I don't know if it would be better 
to duplicate the function for SWF...)

With these two changes, the SDK has been compiled for me.

Hiedra

-----Mensaje original-----
De: Maria Jose Esteve <mjest...@iest.com> 
Enviado el: sábado, 22 de junio de 2024 0:26
Para: dev@royale.apache.org
Asunto: RE: DataGrid with dynamically assaigend itemrenderer

Hi Piotr, please you can check the changes in "DataGridView.as" gives error 
when compiling the SDK:

     [java] 
D:\Develop_Royale\Projects\Royale-SDK\royale-asjs\frameworks\projects\Jewel\src\main\royale\org\apache\royale\jewel\beads\views\DataGridView.as(548):
 col: 56 Error: Access of possibly undefined property element through a 
reference with static type IChild.
     [java] 
     [java]                      (newDataGridColumnList as 
IChild).element.style["minWidth"] = (dataGridColumnList as 
IChild).element.style["minWidth"];

Thx.
Hiedra

-----Mensaje original-----
De: Piotr Zarzycki <piotrzarzyck...@gmail.com> Enviado el: viernes, 21 de junio 
de 2024 17:04
Para: Apache Royale Development <dev@royale.apache.org>
Asunto: DataGrid with dynamically assaigend itemrenderer

Hi All,

I have in Jewel a need of having DataGrid where I can assign itemRenderer in 
the code. Currently we have two options to do that

1)

<j:DataGrid>
    <j:columns>
         <j:DataGridColumn
itemRenderer="my.itemRenderer.MyCustomItemRenderer"/>
    </j:columns>
</j:DataGrid>

2) Using css

.myClass {
   IItemRenderer: ClassReference("my.itemRenderer.MyCustomItemRenderer");
}

<j:DataGrid >
    <j:columns>
         <j:DataGridColumn className="myClass">
    </j:columns>
</j:DataGrid>

However I need something like that:

var itemRendererFactory:ClassFactory = new ClassFactory(MyCustomItemRenderer);
itemRendererFactory.properties = {property: "prop", some: false}; 
myDGColumn.itemRenderer=itemRendererFactory;

I have implemented this and I'm going to commit this soon. Everything was baked 
in into DataGridView. I'm thinking about having separate DataGridView bead. If 
someone will have any comments feedback after my commit let me know. :)

Thanks,
-- 

Piotr Zarzycki

Reply via email to