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
Sent from the FlexCoders mailing list archive at Nabble.com.

Reply via email to