click on + sign ..........i want both the cell in the same row editable
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="init()" viewSourceURL="srcview/ index.html"> <mx:DataGrid id="myDG" dataProvider="{customers}" rowCount="5" width="100%" height="100%" editable="true"> <mx:columns> <mx:DataGridColumn headerText="Name" width="100" dataField="name" editable="false" editorDataField="text"> <mx:itemRenderer> <mx:Component> <mx:HBox> <mx:Label text="{data.name}" /> <mx:Spacer width="100%" /> <mx:Label text="+" click="outerDocument.editCell(0)" toolTip="Edit" /> </mx:HBox> </mx:Component> </mx:itemRenderer> <mx:itemEditor> <mx:Component> <mx:TextInput text="{data.name}" /> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> <mx:DataGridColumn headerText="Addresss" dataField="address" width="200" editable="false" editorDataField="text"> <mx:itemRenderer> <mx:Component> <mx:HBox> <mx:Label text="{data.address}" /> <mx:Spacer width="100%" /> <mx:Label text="+" click="outerDocument.editCell(1)" toolTip="Edit" /> </mx:HBox> </mx:Component> </mx:itemRenderer> <mx:itemEditor> <mx:Component> <mx:TextInput text="{data.address}" /> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> </mx:columns> </mx:DataGrid> <mx:Model id="custdata"> <customers> <customer> <name editable="true">Cust1</name> <address>Address1</address> </customer> <customer> <name>Cust2</name> <address>Address2</address> </customer> <customer> <name>Cust3</name> <address editable="true">Address3</address> </customer> </customers> </mx:Model> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; [Bindable] private var showAllCols:Boolean = false; [Bindable] private var customers:ArrayCollection = new ArrayCollection(); private function init():void { customers = new ArrayCollection(custdata.customer); } public function editCell(column:Number):void { myDG.editedItemPosition = {columnIndex:column, rowIndex:myDG.selectedIndex}; columnIndex:column = 1; myDG.editedItemPosition = {columnIndex:column, rowIndex:myDG.selectedIndex}; } ]]> </mx:Script> </mx:Application> On Dec 20, 5:46 pm, "sheetal nilwant" <[email protected]> wrote: > can i see that piece of code? > > > > On Sat, Dec 20, 2008 at 5:15 PM, rohit <[email protected]> wrote: > > > i have one check box in a column of data grid > > > i want, when i click on the perticular check box the whole rows goes > > to editable.and accept the cell where check box exist. > > > but when i did it did editable only one cell of that perticular rows. > > > plz give me quick reply....its urgent for me- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

