I have a problem, what kind of variable is myData? sorry for my ignorance
--- In [email protected], Miguel D�az Valenzuela <[EMAIL PROTECTED]> wrote: > > yeah man, i think that is for me, i will check you suggestion > > many thanks to you Agha > > --- In [email protected], "Mehdi, Agha" <[EMAIL PROTECTED]> wrote: > > Miguel, > > > > If I'm right about your question then here's the solution. > > > > The datagrid has 4 columns. One of them has checkboxes in it. > > > > Datagrid = myData > > > > Column1 = select (with checkboxes) > > Column2 = name > > Column3 = age > > Column4 = city > > > > Var selectedData = new Array(); > > > > For ( var i = 0; i < myData.length; i++ ) > > { > > if ( myData.getItemAt(i).select ) > > { > > selectedData.push( myData.getItemAt(i) ); > > } > > } > > > > selectedData array will now hold all the items from the datagrid > where the > > checkbox is selected. To get other columnvalues you can simply say: > > > > Name = selectedData[0].name; > > Age = selectedData[0].age; > > > > Please let me know if that's what you wanted. > > > > Thanks > > > > -- Agha > > > > -----Original Message----- > > From: Miguel D�az Valenzuela [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, February 01, 2005 7:37 AM > > To: [email protected] > > Subject: [flexcoders] Re: how can I do this in Flex? -- (warning, > > best-practice police are in the hou > > > > > > > > Well, many thanks to you for help me. > > I know about webservice and I have already realized an "insert" to > datebase > > through Flex with simple textimputs or textareas, but my trouble is > about a > > checkrenderer. I must count records of a datagrid, see which of those > > records they are checked, and extract the value of a column of the above > > mentioned record. In .NET everything is very explicit, but in Flex I > do not > > know that codes to use in the .as code of my .mxml file. > > I know that to count rows of a datagrid i can use rowCount, but for > others > > two tasks I cannot which option use (rowIndex, i don't know) > > > > sorry for my poor english, and i hope you understand me. > > many thanks in advance > > > > --- In [email protected], "Steven Webster" <[EMAIL PROTECTED]> > wrote: > > > Miguel, > > > > > > > Actually i´m learning to use Macromedia Flex and i´m working with > > > > a checkrenderer datagrid, but in this moment i have a trouble. > > > > > > > > I need to do a insert info a for(...) sentence, but i can´t find > > > > correct code for do that. > > > > > > > > This is code in .NET > > > > > > With .NET, it's quite common for the "page-technology" to embed SQL > > > connection information. This isn't a failing of .NET as such (as > > > there are good practices with ADO.NET and the Microsoft Enterprise > > > Patterns that can be followed) but is a common 2-tier solution > that we > > > see people implementing, especially from an ASP.NET / VB.NET > > > background. > > > > > > Flex does not offer explicit support for SQL; it is a presentation > > > tier solution, that assumes that any business logic will be performed > > > on the server-side of the wire. So - I would expect you to have some > > > .NET code (VB.NET, C#, etc) that uses the ADO.NET libraries to > perform > > > any SQL queries that you wish to perform, and that this code > reside on > > > your server. You will then expose that business tier logic to Flex > > > (currently) through a WebService interface - if you are using C# for > > > instance, this is a very simple thing to do using metadata tags on > the > > > class that encapsulates your data access. > > > > > > Once you have defined a service on the server, Flex can then use the > > > WebService tag to invoke that service; rather than build up a SQL > > > query on the client (which is a *very* bad, though frustratingly > > > common practice) you would instead pass the relevant data (such as > > > "tipo_mant_id") as an argument in a WebService call, such as > > > agregaDetalleMantencionComputador(), > > > and receive the results back from Flex. > > > > > > Once you have that n-tier architecture in place (Flex is a > replacement > > > for the presentation tier *only*) then how to invoke web services on > > > the server, and how to handle the results that you get back, etc, > will > > > all be much clearer to you from the documentation and (shameless > plug) > > > books that are out there. > > > > > > So I'm afraid I'd be tempted to suggest that if you want to embrace > > > Flex as a presentation-tier solution, abandon all hopes of 2-tier > > > (database code from your integration tier intermingled with > > > presentation tier code) architecture, and avoid a run-in with the > > > best-practice police... > > > > > > Hope this helps, > > > > > > Best, > > > > > > Steven > > > PS. The only other word I know is 'cerveza' > > > > > > -- > > > Steven Webster > > > Technical Director > > > iteration::two > > > [EMAIL PROTECTED] > > > > > > Office: +44 (0)131 338 6108 > > > Mobile: +44 (0)7977 216 223 > > > > > > This e-mail and any associated attachments transmitted with it may > > contain > > > confidential information and must not be copied, or disclosed, or > > used by > > > anyone other than the intended recipient(s). If you are not the > > > intended > > > recipient(s) please destroy this e-mail, and any copies of it, > > immediately. > > > > > > Please also note that while software systems have been used to try > > to ensure > > > that this e-mail has been swept for viruses, iteration::two do not > > accept > > > responsibility for any damage or loss caused in respect of any > viruses > > > transmitted by the e-mail. Please ensure your own checks are carried > > > out before any attachments are opened. > > > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > ---- > > This email may contain confidential and privileged material for the > sole use of the intended recipient(s). Any review, use, distribution > or disclosure by others is strictly prohibited. If you are not the > intended recipient (or authorized to receive for the recipient), > please contact the sender by reply email and delete all copies of this > message. > > > > To reply to our email administrator directly, send an email to > > [EMAIL PROTECTED] > > > > Littler Mendelson, P.C. > > http://www.littler.com

