This is how my mxml looks.

<mx:AdvancedDataGrid x="24" y="40"
                                                                 
id="viewArticlesAdvanceDataGrid"
                                                                 
designViewDataType="flat" fontFamily="Verdana"
borderVisible="false"
                                                                 width="96%" 
height="100%"
                                                                 
dropShadowVisible="true"
                                                                 
dataProvider="{myData}"
                                                                 
verticalScrollPolicy="on"
                                                                 
horizontalScrollPolicy="off" >
                                <mx:groupedColumns>

                                        <mx:AdvancedDataGridColumn 
headerText="ID" dataField="ID"/>
                                        <mx:AdvancedDataGridColumn 
headerText="Title" dataField="Title"
wordWrap="false"/>
                                        <mx:AdvancedDataGridColumn 
headerText="Categories"
dataField="Categories"/>
                                        <mx:AdvancedDataGridColumn 
headerText="Author" dataField="Author"/
>
                                        <mx:AdvancedDataGridColumn 
headerText="Status" dataField="Status"/
>
                                        <mx:AdvancedDataGridColumn 
headerText="Last Modified"
dataField="LastModified"/>
                                        <mx:AdvancedDataGridColumnGroup 
headerText="Action">
                                                <mx:AdvancedDataGridColumn 
dataField="Edit">
                                                        <mx:itemRenderer>
                                                                <fx:Component>
                                                                        
<mx:LinkButton label="Edit" width="40"
click="edit_clickHandler(event)">
                                                                                
<fx:Script>
                                                                                
        <![CDATA[
                                                                                
                import mx.core.IFlexDisplayObject;
                                                                                
                import mx.events.CloseEvent;
                                                                                
                import mx.managers.PopUpManager;

                                                                                
                protected function
edit_clickHandler(event:MouseEvent):void
                                                                                
                {
                                                                                
                        var win:EditArticlePopUp = 
PopUpManager.createPopUp(this,
EditArticlePopUp, true) as EditArticlePopUp;
                                                                                
                        win.move(150,75);
                                                                                
                }
                                                                                
        ]]>
                                                                                
</fx:Script>
                                                                        
</mx:LinkButton>
                                                                </fx:Component>

                                                        </mx:itemRenderer>
                                                </mx:AdvancedDataGridColumn>
                                                <mx:AdvancedDataGridColumn 
dataField="View">
                                                        <mx:itemRenderer>
                                                                <fx:Component>
                                                                        
<mx:LinkButton label="View" width="40"
click="view_clickHandler(event)">
                                                                                
<fx:Script>
                                                                                
        <![CDATA[
                                                                                
                import mx.core.IFlexDisplayObject;
                                                                                
                import mx.events.CloseEvent;
                                                                                
                import mx.managers.PopUpManager;

                                                                                
                protected function
view_clickHandler(event:MouseEvent):void
                                                                                
                {
                                                                                
                        var win:ViewArticlePopUp = 
PopUpManager.createPopUp(this,
ViewArticlePopUp, false) as ViewArticlePopUp;
                                                                                
                        win.move(150,75);
                                                                                
                }
                                                                                
        ]]>
                                                                                
</fx:Script>

                                                                        
</mx:LinkButton>

                                                                </fx:Component>

                                                        </mx:itemRenderer>
                                                </mx:AdvancedDataGridColumn>
                                        </mx:AdvancedDataGridColumnGroup>
                                </mx:groupedColumns>

                        </mx:AdvancedDataGrid>



On Apr 13, 1:37 am, [email protected] wrote:
> HOw did you do it???
>
>
>
> On Mon, Apr 12, 2010 at 8:34 PM, pradp <[email protected]> wrote:
> > ok, I got it working after trying different options.
>
> > thanks
>
> > On Apr 11, 4:16 pm, pradp <[email protected]> wrote:
> > > Hi
>
> > > Let me explain you my requirement.
> > > I have a datagrid/Advanceddatagrid to which I am populating the data
> > > from an external xml file using actionscript.
> > > Now I wanted to add a button,url link as another column along with the
> > > xml data.
>
> > > Here is the code snippet:
>
> > > *************************
> > > xmlProduct = new XML(ulXML.data);
> > >         trace("xmlProduct: "+ xmlProduct.toXMLString());
> > >         productList = new XMLList(xmlProduct.children());
> > >         trace("productList "+productList.children());
>
> > >         for( var x:uint = 0; x < productList.length(); x++ )
> > >         {
> > >                 var obj:Object = new Object();
> > >                 obj.ID = productList[x].ID;
> > >                 obj.Title =  productList[x].Title;
> > >                 obj.Categories =  productList[x].Categories;
> > >                 obj.Author =  productList[x].Author;
> > >                 obj.Status =  productList[x].Status;
> > >                 obj.LastModified =  productList[x].LastModified;
>
> > >                 orgData.addItem(obj);
> > >         }
> > > *************************
> > > I am adding the extracted data to an arraycollection(orgData) and
> > > setting the dataprovider for the datagrid.
> > > How can I add a button in this scenarion. Also, I am doing pagination
> > > as well.
>
> > > Thanks
> > > Pradp
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Flex India Community" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<flex_india%2bunsubscr...@googlegrou 
> > ps.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/flex_india?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to