rendererProviders in AdvancedDataGrid using Actionscript
hi..
am working advanceddatagrid...
am generating these grids @ runtime...
<mx:advanceddatagrid id="myadg"
width="100%" height="100%"
variablerowheight="true">
<mx:dataprovider>
<mx:hierarchicaldata source="{dphierarchy}"/>
</mx:dataprovider>
<mx:columns>
<mx:advanceddatagridcolumn datafield="name" headertext="name"/>
<mx:advanceddatagridcolumn datafield="total" headertext="total"/>
</mx:columns>
<mx:rendererproviders>
<mx:advanceddatagridrendererprovider
datafield="detail"
renderer="chartrenderer"
columnindex="0"
columnspan="0"/>
</mx:rendererproviders>
</mx:advanceddatagrid>
now in code used rendererproviders.
using mxml can write this...
bcse generating grid @ runtime.. need code using actionscript.
any idea how implement renderproviders... using actionscript??
can 1 me how write above code.. rendererproviders part using actionscript???
thanks
pratap
am working advanceddatagrid...
am generating these grids @ runtime...
<mx:advanceddatagrid id="myadg"
width="100%" height="100%"
variablerowheight="true">
<mx:dataprovider>
<mx:hierarchicaldata source="{dphierarchy}"/>
</mx:dataprovider>
<mx:columns>
<mx:advanceddatagridcolumn datafield="name" headertext="name"/>
<mx:advanceddatagridcolumn datafield="total" headertext="total"/>
</mx:columns>
<mx:rendererproviders>
<mx:advanceddatagridrendererprovider
datafield="detail"
renderer="chartrenderer"
columnindex="0"
columnspan="0"/>
</mx:rendererproviders>
</mx:advanceddatagrid>
now in code used rendererproviders.
using mxml can write this...
bcse generating grid @ runtime.. need code using actionscript.
any idea how implement renderproviders... using actionscript??
can 1 me how write above code.. rendererproviders part using actionscript???
thanks
pratap
this should -
// create new rendererprovider
var rp:advanceddatagridrendererprovider = new advanceddatagridrendererprovider();
rp.datafield = "detail";
rp.renderer = new classfactory(chartrenderer);
rp.columnindex = 0;
rp.columnspan = 0;
// assign rendererprovider rendererproviders array
adg.rendererproviders = [rp];
- sameer
http://techrays.wordpress.com/
// create new rendererprovider
var rp:advanceddatagridrendererprovider = new advanceddatagridrendererprovider();
rp.datafield = "detail";
rp.renderer = new classfactory(chartrenderer);
rp.columnindex = 0;
rp.columnspan = 0;
// assign rendererprovider rendererproviders array
adg.rendererproviders = [rp];
- sameer
http://techrays.wordpress.com/
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment