invoke the showData method, once the delete is complete. On Tue, Feb 26, 2008 at 3:49 PM, Sujit Reddy <[EMAIL PROTECTED]> wrote:
> create a ArrayCollection object and bind datagrid to this ArrayCollection > object. handle the result event of the HTTPService, in the event handler, > set the result to the array collection object. invoke the refresh() method > of the ArrayCollection to refresh the datagrid. > > Regards, > Sujit Reddy G > > > On Mon, Feb 25, 2008 at 5:02 PM, arulmurugan < > [EMAIL PROTECTED]> wrote: > > > How to reload or refresh my dataGrid after deleting recored from > > database. I am using asp to delete the recoreds. > > > > But the datagrid is not refreshing. after clicking the delete button. > > How to do it. I am new 2 Flex. > > > > <?xml version="1.0" encoding="utf-8"?> > > > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" > > layout="absolute" > > creationComplete="userRequest.send()"> > > > > <mx:Script> > > <![CDATA[ > > private function deleteData():void { > > userDelete.send(); > > } > > > > private function showData():void { > > userRequest.send(); > > > > } > > ]]> > > </mx:Script> > > <mx:HTTPService id="userRequest" url="request.asp" useProxy="false" > > method="POST"> > > <mx:request xmlns=""> > > <user_name>{username.text}</user_name> > > </mx:request> > > </mx:HTTPService> > > > > <mx:HTTPService id="userDelete" url="request.asp" useProxy="false" > > method="POST"> > > <mx:request xmlns=""> > > <user_id>{dgUserRequest.selectedItem.userid}</user_id> > > </mx:request> > > </mx:HTTPService> > > > > <mx:Form x="22" y="10" width="493"> > > <mx:HBox><mx:Label text="Username"/><mx:TextInput > > id="username"/></mx:HBox> > > <mx:Button label="Submit" click="showData();"/> > > <mx:Button label="Delete" click="deleteData();"/> > > </mx:Form> > > > > <mx:DataGrid id="dgUserRequest" > > dataProvider="{userRequest.lastResult.users.user}" > > x="22" y="140" width="493" height="125" > > > <mx:columns> > > <mx:DataGridColumn headerText="User ID" dataField="userid"/> > > <mx:DataGridColumn headerText="User Name" dataField="username"/> > > <mx:DataGridColumn headerText="E-Mail" dataField="emailaddress"/> > > </mx:columns> > > </mx:DataGrid> > > > > <mx:TextInput id="selectedemailaddress" > > text="{dgUserRequest.selectedItem.emailaddress}" > > x="355" y="273" /> > > > > <mx:TextInput id="selecteduserid" > > text="{dgUserRequest.selectedItem.userid}" > > x="22" y="273" /> > > > > </mx:Application> > > > > > > > > > > -- > Regards, > Sujit Reddy. G -- Regards, Sujit Reddy. G