Hi Harish, This is my code:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientColors="[#A6D2FF, #d5eaff]" backgroundColor="#8CC6FF" initialize="initVars();"> <mx:Script><![CDATA[ import mx.controls.dataGridClasses.DataGridColumn; import mx.utils.XMLUtil; import mx.utils.ArrayUtil; import mx.containers.TitleWindow; import mx.managers.PopUpManager; import mx.controls.Alert; [Bindable] public var valor:String = "getEntidades"; [Bindable] public var vSomaTotal:String = "0"; private function initVars():void { srvDados.send(); srvEntidades.send(); } public function naoCarrgerouDados():void { Alert.show("Os dados não puderam ser carregados. Entre em contato com o Admnistrador do Sistema.", "Erro"); } private function showCampos():void { var janelaCampos:Campos = Campos (PopUpManager.createPopUp(this, Campos, true)); PopUpManager.centerPopUp(janelaCampos); } private function showItens():void { vLista.visible = true; btCampos.visible = true; } private function atualizaValor(item:Object, coluna:DataGridColumn):String { var soma:Number = 0; soma = Number(item.jan) + Number(item.fev) + Number (item.mar) + Number(item.abr) + Number(item.mai) + Number(item.jun) + Number(item.jul) + Number(item.ago) + Number(item.set) + Number (item.out) + Number(item.nov) + Number(item.dez); return String(soma); } ]]></mx:Script> <mx:HTTPService id="srvDados" url="../dados.asp" method="POST" showBusyCursor="true"/> <mx:HTTPService id="srvIndicadores" url="../get_valores.asp" method="GET" showBusyCursor="true" fault="naoCarrgerouDados();" result="showItens()"> <mx:request> <valor>{valor}</valor> </mx:request> </mx:HTTPService> <mx:HTTPService id="srvEntidades" url="../get_valores.asp" method="GET" showBusyCursor="true" fault="naoCarrgerouDados();"> <mx:request> <valor>{valor}</valor> </mx:request> </mx:HTTPService> <mx:Image x="10" y="10" source="img/logo.gif"/> <mx:Canvas x="0" y="68" width="100%" height="40" backgroundColor="#85BCF2" color="#000000"> <mx:Label x="10" y="12" text="{srvDados.lastResult.data.dados.saudacao} - Hoje é {srvDados.lastResult.data.dados.hoje}"/> </mx:Canvas> <mx:Panel id="quadro" top="116" left="10" right="10" bottom="10" title="RH Direto - Cálculos OBZ" fontSize="11" color="#000000"> <mx:Canvas id="op0" width="100%" height="60"> <mx:ComboBox x="10" y="26" dataProvider="{srvEntidades.lastResult.data.entidade}" labelField="descricao" change="valor='getIndicadores'; srvIndicadores.send();"></mx:ComboBox> <mx:Label x="10" y="10" text="ENTIDADE:"/> </mx:Canvas> <mx:Canvas id="op1" width="100%" height="100%"> <mx:DataGrid id="vLista" dataProvider="{srvIndicadores.lastResult.data.indicador}" top="0" bottom="10" left="10" right="10" visible="false" editable="true"> <mx:columns> <mx:Array> <mx:DataGridColumn dataField="nome" headerText="VERBA/MÊS" width="150" textAlign="left" editable="false" /> <mx:DataGridColumn dataField="jan" headerText="JAN" width="50" textAlign="right"/> <mx:DataGridColumn dataField="fev" headerText="FEV" width="50" textAlign="right"/> <mx:DataGridColumn dataField="mar" headerText="MAR" width="50" textAlign="right"/> <mx:DataGridColumn dataField="abr" headerText="ABR" width="50" textAlign="right"/> <mx:DataGridColumn dataField="mai" headerText="MAI" width="50" textAlign="right"/> <mx:DataGridColumn dataField="jun" headerText="JUN" width="50" textAlign="right"/> <mx:DataGridColumn dataField="jul" headerText="JUL" width="50" textAlign="right"/> <mx:DataGridColumn dataField="ago" headerText="AGO" width="50" textAlign="right"/> <mx:DataGridColumn dataField="set" headerText="SET" width="50" textAlign="right"/> <mx:DataGridColumn dataField="out" headerText="OUT" width="50" textAlign="right"/> <mx:DataGridColumn dataField="nov" headerText="NOV" width="50" textAlign="right"/> <mx:DataGridColumn dataField="dez" headerText="DEZ" width="50" textAlign="right"/> <mx:DataGridColumn dataField="total" headerText="TOTAL" width="50" textAlign="right" editable="false" labelFunction="atualizaValor"/> </mx:Array> </mx:columns> </mx:DataGrid> </mx:Canvas> <mx:ControlBar width="100%"> <mx:Button label="Campos" id="btCampos" icon="@Embed (source='img/btn_binoculo.gif')" labelPlacement="left" visible="false" click="showCampos();"/> </mx:ControlBar> </mx:Panel> </mx:Application> --- In [email protected], "Harish Sivaramakrishnan" <[EMAIL PROTECTED]> wrote: > > Hi Rafael, > > Can you please add a code snippet here for the problem that you are > encountering? > > Thanks > Harish > > On 9/13/06, rafael_magalhaes007 <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > i have a datagrid with N column, > > in this datagrid there's a column in the end that makes the sum of all > > the other columns > > this sum is made by the property labelFunction that calls out a > > function created by me to sum the values in the columns > > > > the cells are editable and when i change the values of the first 2 > > lines it works fine, but from the thrid line ahead nothing happens > > unless i change the values of the first 2 lines it works fine, but from > > the thrid line ahead nothing happens unless i change the values of > > column 1 or 2 again, then it works and does the Sum. > > > > i want to know how to make it work for every line i change not neding > > to change line 1 and 2 for the other to work.. > > > > thanks for your help, > > []´ > > Rafael > > > > > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

