Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-10-2006, 05:09 PM   #1
GBScubaSteve
Registered User
 
Join Date: Dec 2006
Posts: 4
Default XML/Datagrid - need some help...

Folks,

My first post here so - hopefully I'll find some help.

I have a datagrid that is populated by loading an XML file, throwing the XML info into an array, and then datagrid.dataProvider = array. works like a charm but herein lies the problem...

The XML file is fairly simple, but there is information in that file that I do not display in the datagrid for info-overload reasons. what I want to do is allow the user to click on any row in the datagrid at which point the ADDITIONAL information is displayed below via either another datagrid (not likely) or a form-style arrangement of dynamic text fields.

just doing some playing around, i set up a listener for grid clicks to trace (myDataGrid.selectedItem) but it returns "selectedItem = [object Object]" regardless of which row is selected. No idea what that means, but then again I guess I wasn't sure WHAT it was gonna say back.

either way, can anyone provide a little guidance here? my idea is that perhaps i can add a new "index" value to the xml->array->dataProvider and then each time you click a row, it returns that "index" value. then a loop can go thru the XML and locate that index value. from there i can just pick out the extra information i need directly from the XML.

thoughts? this has been hanging me up for 3 days now. note I'm using the stock Flash 8 datagrid component.

Thanks a million in advance.

steve
GBScubaSteve is offline   Reply With Quote
Old 12-13-2006, 02:59 AM   #2
elmedio
Senior Member
 
Join Date: Aug 2005
Posts: 107
Default

I'm having almost the same problem...
I have two data grids with respective data sets, feeding from the same xml file, basically I want to replicate the html "anchor" effect, each time I click on the datagrid, I pass the itemIndex to the other data grid and it jumps to the values for this cell. but I haven't solved it yet because I don't know what method of the datagrid to use, and there might not be one....
For your thing you might want to check out this tutorial:
http://www.flash-db.com/Tutorials/databind/index.php
Hope it helps!
elmedio is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:41 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.