Click here to Skip to main content
11,790,021 members (48,655 online)
Rate this: bad
Please Sign up or sign in to vote.
i have a datagrid which is getting values from a XML file (getting this xml file from database using PHP and HTTP request in flex). i have created a checkbox in every row in data grid. and here is my requirement: i want to select tow or three check-box and would like to get all the values form that particular ROWs in some form , prefered arraycollection (such that i can pass this array directly to a bar chart) .. can some one help me as i am new to flex .
code .....
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="" layout="vertical" creationComplete="siteData.send()">
			import mx.collections.XMLListCollection;
			import mx.controls.*;
			import mx.controls.Alert;
			[Bindable] private var fullXML:XMLList; 
			private function contentHandler(evt:ResultEvent):void{
				fullXML = evt.result.values;

		<mx:Label text="This Data Grid is loading the full XML file"/>
		<mx:DataGrid width="600"  id="datagrid" dataProvider="{fullXML}">
				<mx:DataGridColumn headerText="Select">
							<mx:HBox horizontalAlign="center">
								<mx:CheckBox id="check"/>
				<mx:DataGridColumn dataField="release_version" headerText="Release"/>
				<mx:DataGridColumn dataField="build" headerText="build"/>
				<mx:DataGridColumn dataField="time_login" headerText="time_login"/>
				<mx:DataGridColumn dataField="time_tunnel" headerText="time_tunnel"/>
				<mx:DataGridColumn dataField="rate_login" headerText="time_tunnel"/>
				<mx:DataGridColumn dataField="rate_tunnel" headerText="rate_tunnel"/>
	<mx:HTTPService url="http://localhost/php_genxml.php" id="siteData" result="contentHandler(event)" resultFormat="e4x"/>

I want to select some check box and want to get the values of all the fields in data-grid correspond to that check-box, can some one help me how to get the selected values (selected values of check-box) in flex and action script.
Posted 2-Jan-12 7:42am
Edited 2-Jan-12 7:50am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 1,029
1 Maciej Los 790
2 KrunalRohit 686
3 CPallini 606
4 Richard MacCutchan 460

Advertise | Privacy | Mobile
Web02 | 2.8.1509028.1 | Last Updated 2 Jan 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100