My code is like this now, but am not getting any call to my eventhandler
method while am making any changes to the inline comboboxes in datagrid.
<mx:DataGrid id="resultsDG" dataProvider="{newUserList}"
itemEditEnd="notifyChanges(event)">
<mx:columns>
<mx:DataGridColumn dataField="CoreId" headerText="Core Id"/>
<mx:DataGridColumn dataField="FirstName" headerText="First
Name"/>
<mx:DataGridColumn dataField="LastName" headerText="Last Name"/>
<mx:DataGridColumn dataField="ManagerId" headerText="Manager
CoreId"/>
<mx:DataGridColumn dataField="OffCode" headerText="Location"/>
<mx:DataGridColumn dataField="UserLevel" headerText="User Level"
editable="true" editorDataField="selectedItem">
<mx:itemRenderer>
<mx:Component>
<comp:ComboBox selectedValue="{data.UserLevel}">
<mx:Array>
<mx:Object data="Normal"
label="Normal" />
<mx:Object data="Super"
label="Super" />
</mx:Array>
</comp:ComboBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn dataField="DataAdmin"
headerText="Data Admin">
<mx:itemRenderer>
<mx:Component>
<comp:ComboBox selectedValue="{data.DataAdmin}">
<mx:Array>
<mx:Object data="false" label="No"
/>
<mx:Object data="true" label="Yes"
/>
</mx:Array>
</comp:ComboBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn dataField="UserStatus"
headerText="User Status"/>
<mx:DataGridColumn dataField="Tool" headerText="Tool"/>
</mx:columns>
</mx:DataGrid>
Anything that you can help with?? Am lost somewhere I guess..
Manu.
Alex Harui wrote:
>
> Keep track in an itemEditEnd handler of which items need to be updated
>
> ________________________________
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Manu Dhanda
> Sent: Thursday, September 27, 2007 1:13 AM
> To: [email protected]
> Subject: [flexcoders] DataGrid ItemRenderer
>
>
>
>
> Hii All,
>
> I have a datagrid populated with a list of users. Also, am using
> in-place
> item renderer for two columns.
>
> What I want to do is:
>
> Let the admin modify the various details of any number of users(multiple
> rows).
> After updating/changing the details, on the click of "Update" button,
> I want to identify, who all those user's are(user Id's), whose details
> has
> been modified in the datagrid, so that I could update the details for
> modified users only in the database.
>
> Following is the code:
> <mx:DataGrid id="usersDG" dataProvider="{newUserList}" width="100%">
> <mx:columns>
> <mx:DataGridColumn dataField="Id" headerText="Id"/>
> <mx:DataGridColumn dataField="FirstName" headerText="First Name"/>
> <mx:DataGridColumn dataField="LastName" headerText="Last Name"/>
> <mx:DataGridColumn dataField="UserLevel" headerText="User Level">
> <mx:itemRenderer>
> <mx:Component>
> <comp:ComboBox selectedValue="{data.UserLevel}">
> <mx:Array>
> <mx:Object data="Normal" label="Normal" />
> <mx:Object data="Super" label="Super" />
> </mx:Array>
> </comp:ComboBox>
> </mx:Component>
> </mx:itemRenderer>
> </mx:DataGridColumn>
> <mx:DataGridColumn dataField="DataAdmin" headerText="Data Admin">
> <mx:itemRenderer>
> <mx:Component>
> <comp:ComboBox selectedValue="{data.DataAdmin}">
> <mx:Array>
> <mx:Object data="false" label="No" />
> <mx:Object data="true" label="Yes" />
> </mx:Array>
> </comp:ComboBox>
> </mx:Component>
> </mx:itemRenderer>
> </mx:DataGridColumn>
> <mx:DataGridColumn dataField="UserStatus" headerText="User Status"/>
> <mx:DataGridColumn dataField="Tool" headerText="Tool"/>
> </mx:columns>
> </mx:DataGrid>
>
> Thanks,
> Manu.
>
> --
> View this message in context:
> http://www.nabble.com/DataGrid-ItemRenderer-tf4527011.html#a12916787
> <http://www.nabble.com/DataGrid-ItemRenderer-tf4527011.html#a12916787>
> Sent from the FlexCoders mailing list archive at Nabble.com.
>
>
>
>
>
>
--
View this message in context:
http://www.nabble.com/DataGrid-ItemRenderer-tf4527011.html#a12936479
Sent from the FlexCoders mailing list archive at Nabble.com.