Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

How to populate a DataGrid from an XML file

This is a discussion on How to populate a DataGrid from an XML file within the Tutorials forums, part of the English Forums category; Found the issue... an empty XML node. Thanks again....


Go Back   Forum Flash CS3 Flash CS4 > English Forums > Tutorials

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 19-02-08, 21:27
bvstudio1's Avatar
Actionscripter
 
Join Date: Feb 2008
Location: Philadelphia
Posts: 3
Rep Power: 0
bvstudio1 is on a distinguished road
Re: How to populate a DataGrid from an XML file

Found the issue... an empty XML node. Thanks again.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #12 (permalink)  
Old 19-02-08, 21:40
bvstudio1's Avatar
Actionscripter
 
Join Date: Feb 2008
Location: Philadelphia
Posts: 3
Rep Power: 0
bvstudio1 is on a distinguished road
Re: How to populate a DataGrid from an XML file

If anyone else runs into the number sorting issue you'll need to add this -

dg.columns[1].sortOptions = Array.NUMERIC;

to the function initDataGrid()
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #13 (permalink)  
Old 26-02-08, 08:14
Junior Member
 
Join Date: Jan 2008
Posts: 2
Rep Power: 0
xflash is on a distinguished road
Re: How to populate a DataGrid from an XML file

columnIndex:1
rowIndex:1
columnName = surname
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at ListEventExample/::traceMessage()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at fl.controls::SelectableList/fl.controls:SelectableList::handleCellRendererClic k()
at fl.controls::DataGrid/fl.controls:DataGrid::handleCellRendererClick()

when i test movie my fla i have these results...i am trying to retrieve the value of the datagrid cell...it shows me the column , the row and the column Name but it doesn 't give me the cell....

here is the code:

myDataGrid.addEventListener(ListEvent.ITEM_CLICK, traceMessage);

private function traceMessage(event:ListEvent):void {
//private function traceMessage(event:Event):void {
var dg:DataGrid = event.target as DataGrid;
var columnIndex:Number = event.columnIndex;
var row:Number = Number(event.rowIndex);
trace("columnIndex:" + columnIndex);
trace("rowIndex:" + row);
var columnInd:DataGridColumn = dg.getColumnAt(columnIndex);
var colName:String = columnInd.dataField;
trace ("columnName = " + colName);
trace (event.target.selectedItem[colName]);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #14 (permalink)  
Old 22-06-08, 08:39
Junior Member
 
Join Date: Jul 2007
Posts: 9
Rep Power: 0
derrida is on a distinguished road
Re: How to populate a DataGrid from an XML file

Hi

i have a php file that output an xml. and i populate a datagrd with it.
then i have three buttons for delete,add and update, which open a form. i manage to send the data to the database.

the problem: the datagrid does not show the updates. only after i run the php file again.

hope tou can help me to solve the problem

best regards

ron
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #15 (permalink)  
Old 04-10-08, 22:33
Junior Member
 
Join Date: Oct 2008
Posts: 1
Rep Power: 0
SlickSwick is on a distinguished road
Re: How to populate a DataGrid from an XML file

Any way you could make the source files available again please?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Flash Multi Gallery
  #16 (permalink)  
Old 06-10-08, 18:29
Onsitus's Avatar
CSS.FlepStudio.org
 
Join Date: Jul 2007
Location: Nettuno Beach
Posts: 973
Rep Power: 2
Onsitus is on a distinguished road
Re: How to populate a DataGrid from an XML file

Quote:
Originally Posted by SlickSwick View Post
Any way you could make the source files available again please?
Here it is.
Attached Files
File Type: zip populateDatagridXml.zip (661.3 KB, 7 views)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
DataGrid sort column background sjohnyBlaze FLEX builder 3 0 06-08-08 12:04
How to populate a ComboBox from an XML file with Flash CS3 Flep Tutorials 11 05-08-08 09:09
Popolare un DataGrid da file XML Flep Articoli e tutorials 2 08-05-08 09:30
CS3 Datagrid (html link) rburns Actionscript 3.0 newbies 6 01-05-08 20:35
rowHeight variabile in datagrid shork Componenti 4 11-12-07 09:21


All times are GMT. The time now is 22:47.


Powered by vBulletin versione 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406