Hi Amy,

Thanks..

One more question , Is there any different rule to add itemrender on
categorized grids ? For example, Here is my sample code to for Hazard and
Status column ,

var col1:AdvancedDataGridColumn = new AdvancedDataGridColumn();
                                var col2:AdvancedDataGridColumn = new
AdvancedDataGridColumn();
                                //data for column 1
                                col1.headerText="Hazard"
                                col1.dataField = "hazard";
                                col1.itemRenderer = new RenderCategory();
                                cols.push(col1);
                                //data for column 2
                               col2.headerText="Status"
                                col2.dataField = "status";
                                col2.itemRenderer = new RenderCategory();
                                cols.push(col2);

But when I view my grid , It only applies to Status column ,

[image: 1.PNG]

But if I remove grouping , rendering applies to both the columns . However,
Hazard is not a grouping field, There is another grouping field "category" .

Rishi


On Wed, Aug 18, 2010 at 10:38 AM, Amy <amyblankens...@bellsouth.net> wrote:

>
>
> An XML node can never be equal to a string.
>
>
> --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,
> RishiShahi <rishi.s...@...> wrote:
> >
> >
> > I'm trying to add itemRenderer like, but it doesn't work. However if I
> remove
> > the check it's adding the itemRenderer.
> >
> > for each (var column:XML in columns)
> > {
> > var col:AdvancedDataGridColumn = new AdvancedDataGridColumn(column);
> > col.headertext=colu...@label;
> >
> > if(column=="status") {
> > col.itemRenderer = new ClassFactory(RenderCategory);
> > }
> >
> > col.width=Number(colu...@width);
> > cols.push(col);
> > }
> > --
> > View this message in context:
> http://old.nabble.com/What%27s-wrong-in-using-itemRenderer---tp29449236p29449236.html
> > Sent from the FlexCoders mailing list archive at Nabble.com.
> >
>
>  
>

<<1.PNG>>

Reply via email to