hi Ravi

Thanks a lot
i got it , its working

Thanks  Thanks

-- 
Karthik.k
Mobile - +91-9894991640

On 4/20/09, Ravi Mishra <[email protected]> wrote:
>
>
> Hey Karthik,
>
> In both the renderers file you are extending from Datagrid and
> DatagridColumn.....dont do this way.
> Both the renderes should extend from Text. Just make this change and
> it will start working for sure.
>
> One more thing....you can set the editable="false" for datagrid in
> case you don't want it editable.
>
> HTH,
>
> -Ravi
>
> On Apr 20, 2:26 pm, Karthik K <[email protected]> wrote:
> > Hi Ravi
> >
> > this is the correct file
> >
> > Prevoiusly sent mail will miss some data
> >
> > --
> > Karthik.k
> > Mobile - +91-9894991640
> >
> > On 4/20/09, Karthik K <[email protected]> wrote:
> >
> >
> >
> > > hi Ravi
> >
> > > I am sorry
> >
> > > i am sending it in zip format
> >
> > > --
> > > Karthik.k
> > > Mobile - +91-9894991640
> > >  On 4/20/09, Ravi Mishra <[email protected]> wrote:
> >
> > >> Hi Karthik,
> >
> > >> I can't open rar files. It wud be gud if u send a zip so that i can
> > >> extract and have a look.
> >
> > >> -Ravi
> >
> > >> On Apr 20, 1:54 pm, Karthik K <[email protected]> wrote:
> > >> > hi ravi
> >
> > >> > Thanks for your efforts
> >
> > >> > please check the attached src.rar
> > >> > i did what you said but when i run nothing is comming
> >
> > >> > please help
> >
> > >> > Thanks
> >
> > >> > --
> > >> > Karthik.k
> > >> > Mobile - +91-9894991640
> >
> > >> > On 4/20/09, Ravi Mishra <[email protected]> wrote:
> >
> > >> > > Hi Karthik,
> >
> > >> > > I don't have any link for that. I just wrote a code and it was
> working
> > >> > > fine. Below are the snippets for Datagrid, dragRenderer and
> > >> > > dropRenderer.
> >
> > >> > > Let me know if you find them helpful.
> >
> > >> > > <mx:DataGrid dataProvider="{ac}" editable="true" >
> > >> > >                <mx:columns>
> > >> > >                        <mx:DataGridColumn dataField="ename"
> > >> > > itemRenderer="com.DragRenderer"/>
> > >> > >                        <mx:DataGridColumn dataField="sal"
> > >> > > itemRenderer="com.DropTargetRenderer"/>
> > >> > >                </mx:columns>
> > >> > >        </mx:DataGrid>
> >
> > >> > > //DragRenderer
> > >> > > public function DragRenderer()
> > >> > >                {
> > >> > >                        super();
> > >> > >                        this.setStyle("fontWeight","bold");
> > >> > >                        this.setStyle("textAlign","left");
> >
> > >> > > this.addEventListener(MouseEvent.MOUSE_MOVE,handleDrag);
> > >> > >                }
> >
> > >> > >                override public function set
> data(value:Object):void{
> > >> > >                        super.data = value;
> > >> > >                        this.text = this.data[(listData as
> > >> > > DataGridListData).dataField];
> >
> > >> > > //this.addEventListener(MouseEvent.CLICK,clickHandler);
> > >> > >                }
> > >> > >                /* private function
> clickHandler(e:MouseEvent):void{
> >
> > >> > >                }
> > >> > >                 */
> >
> > >> > >                private function handleDrag(e:MouseEvent):void{
> > >> > >                        var obj:String = this.text;
> > >> > >                        var dragInitiator:Text = e.currentTarget as
> > >> Text;
> > >> > >                        var dragSource:DragSource = new
> DragSource();
> > >> > >                        dragSource.addData(obj,'value');
> > >> > >                        var dragProxy:Image = new Image();
> > >> > >                        dragProxy.source = "admin2.gif";
> >
> > >> > > DragManager.doDrag(dragInitiator,dragSource,e,dragProxy);
> > >> > >                }
> >
> > >> > > //DropTargetRenderer
> > >> > > public function DropTargetRenderer()
> > >> > >                {
> > >> > >                        super();
> >
> > >> > > this.addEventListener(DragEvent.DRAG_ENTER,dragEnterHandler);
> >
> > >> > > this.addEventListener(DragEvent.DRAG_EXIT,dragExitHandler);
> >
> > >> > > this.addEventListener(DragEvent.DRAG_DROP,dragDropHandler);
> > >> > >                }
> >
> > >> > >                private function
> dragEnterHandler(e:DragEvent):void{
> > >> > >                        var dropTarget:Text = e.currentTarget as
> Text;
> >
> > >> > >                        if(e.dragSource.hasFormat('value')){
> > >> >
> >                                DragManager.acceptDragDrop(dropTarget);
> > >> > >                        }
> > >> > >                }
> >
> > >> > >                private function dragExitHandler(e:DragEvent):void{
> > >> > >                        var dropTarget:Text = e.currentTarget as
> Text;
> > >> > >                }
> >
> > >> > >                private function dragDropHandler(e:DragEvent):void{
> > >> > >                        var value:String =
> > >> > > e.dragSource.dataForFormat('value') as String;
> >
> > >> > >                        (e.currentTarget as Text).text += value;
> > >> > >                }
> >
> > >> > > -Ravi
> >
> > >> > > On Apr 20, 12:10 pm, Karthik K <[email protected]> wrote:
> > >> > > > Hi Ravi
> >
> > >> > > > thanks for your response i am searching for any samples but not
> able
> > >> to
> > >> > > find
> >
> > >> > > > is there any samples or link which will help me
> >
> > >> > > > Thanks
> >
> > >> > > > --
> > >> > > > Karthik.k
> > >> > > > Mobile - +91-9894991640
> >
> > >> > > > On 4/20/09, Ravi Mishra <[email protected]> wrote:
> >
> > >> > > > > Hi Karthik,
> >
> > >> > > > > Yes we can drag the data from one cell to another cell of a
> > >> datagrid.
> > >> > > > > And to achieve that you will have to use itemrenderers. You
> will
> > >> have
> > >> > > > > to write a logic for drag and drop in those itemrendrers.
> >
> > >> > > > > HTH,
> >
> > >> > > > > -Ravi
> >
> > >> > > > > On Apr 20, 10:49 am, Karthik K <[email protected]>
> wrote:
> > >> > > > > > hi guys
> >
> > >> > > > > > i need to know one thing
> >
> > >> > > > > > can we drag data from one cell to another cell in same
> datagrid
> >
> > >> > > > > > can we do this in advanced datagrid or in normal datagrid
> >
> > >> > > > > > please help
> >
> > >> > > > > > Thanks
> >
> > >> > > > > > --
> > >> > > > > > Karthik.k
> > >> > > > > > Mobile - +91-9894991640
> >
> > >> >  src.rar
> > >> > 2KViewDownload
> >
> >
> >
> >  src.zip
> > 3KViewDownload
> >
>

--~--~---------~--~----~------------~-------~--~----~
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