Datagrid Question
Is there a way to add an item to a data grid without "knowing" the name of the column I've been trying for a while and my code comes to nothing. Code: for (z=0; z<posts.length; z++) { currentNode=posts[z] b = dg.getColumnAt(z); b.columnName==currentNode.nodeName?dg.addItemAt(z,{b:posts[z].firstChild}):""; } is what I've tried and failed with anyone know if its possible ?
KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 11-02-2007, 05:10 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[F8] Datagrid In A Datagrid Column
Hello everyone,
Can someone give me a hint on how to solve the next problem ? I want to display a datagird (the 'child') in a column of another datagrid (the 'parent'). The content of the 1st 'child' datagrid is dependent on the value of the first column and row in the 'parent', etc. ect.
Example : first row in the parent-datagrid is a specific library, the child-datagrid in the first row shows the books available in this library. The second row in the parent-datagrid is another library, and the child-datagrid in the second row has to display the books available in this specific library.
The data to 'feed' both datagrid is coming from XML.
Someone out there who can give me a hint/link ?
I know this can be easily done using Flex/AS 3, but that is (sigh) not possible for this project....
Thanks in advance
Datagrid
Hi,
I have a question about the new datagrid component from Macromedia. I haven't ordered the Resource Kit yet.
I was wondering if it was possible to load a movie or a button into the datagrid component? What is need is a table full of data and depending on the data a button in the table.
Can you load buttons in the datagrid?
The datagrid is filled with a recordset, I think. Can you attach a movie to a recordset?
Hope you guys can help me out!
thanx!
Martsch
Is This A Datagrid ?
Hello:
I was wondering wich component is used here http://www.macromedia.com/cfusion/ex...cfm?view=sn110???
Thanks very much in advance.
DataGrid DataGrid DataGrid
I've been doing design work for a while(print) and am now transfering my skills to the e-comm market.
I got a trial version of mx2004 pro and am trying to work out some issues I have with a dataGrid
//i got data into the table by running this function on press of a button:
var anArray= ({index: index, item_id: id, style: style, model: model, colour: colour, sizes: sizes, qty: qty, price: price, subtotal: subtotal});
var addedArray = _level0.order_form.orderGrid.addItem(anArray);
//i can clear the dataGrid with this:
on (press) {
orderGrid.removeAll()
}
But I am having duficulty trying to fugure out how to get delete a record from the Grid and i also want to calculate the totals for the subtotal column in the grid
Any help with this would be much appreceated.
forgive me if my codeing sucks ive only been doing it a couple months.
CSV To Datagrid...Please Help
Hi All
Hi all
I am sure one of you would be able to help me with that. I am loading a csv file (loadvar) and i need help on how to parse only the data that i need. The code is as follow:
#include "NetServices.as"
l = new LoadVars();
l.load(filename.csv);
l.onData = function(raw)
{
rs = new RecordSet("Column1", "Column2");
tmp = raw.split("
");
for(var i=0;i<tmp.length;i++)
{
r = tmp[i].split(",,");
rs.addItem({Column1:r[0],Column2:r[1]});
}
grid.setRowCount(20);
//grid.setColumns("Column1","Column2");
grid.setDataProvider(rs);
}
}
}
Now here are the first 2 lines of the csv file:
"HB-1","","HB-1","","Graphic"
"Hb-103","","Hb-103","","Graphic"
The above code retrieves the first 2 items of each lines and put them into column1 and 2 of my datagrid. How would i be able to retrieve items 1 and 3 of each lines instead of 1 and 2?? (by example on line 1, i wants to get HB-1 and HB-1 .
Anyone can help me please? please? Please modify the code above to explain.
thanks
Martin
DataGrid Help
Hi there
I have a simple question - so I have a datagrid component filled with data, now I want retrieve the data from a particular cell (lets say the third one on the second row). How to do that ??
Datagrid Pos
if I create a blank document and drag the Datagrid component (AS1) onto the stage, it will work fine, but if I add the datagrid to an existing flash movie with components already on it, it stops working! what gives!, I tried adding it and replacing existing files. I also tried adding with out replacing existing files. I did notice that this component has some updated files that other components use, I tried copyinh these over manually and still no good?
has anyone else had this problem?
DataGrid & XML
I have an XML file stored in the variable XMLdata. How can I set a DataGrid component to display the data in the XML?
Help With Datagrid.... PLEASE?
Hi there,
Just wondering if anyone could help me with a small problem.
I have a php script that spits out a flash encoded variable showing a list of files in a directory on a server. This all works fine.
I now want to be able to use a listBox and a few dataGrids to be able to manipulate this data.
If you can imagine a user uploading different files (let's say mp3 for now) into a folder on the web and then my php script brings back a list of them.
This data would get shown in a listBox. I have just about managed this part.
What I would then like to do is to be able to have a dataGrid (let's say called 'Gallery Items') that would show data from a MySQL database listing a description and the link to the mp3 file.
I would like for the user to be able to choose one of the filenames from the listBox (uploaded files) and when it is clicked on it gets placed into a row in the datagrid. The user can then add a description. They can keep on doing this for as many files as they have uploaded. It must not allow them to add a file more than once though.
Also let's say that the dataGrid had loaded in all the users files and they clicked on a row. When they subsequently click on a row (filename) in the listBox then the dataGrid row will be updated with that filename instead.
I could possibly figure this out but the part I would have real problems with is how do you then use the finished dataGrid information to update the database items. Also if they added more items how to add them to the database, or if they deleted items from the dataGrid then to delete these rows from the database aswell.
What I am really looking for is a way for users to :
Upload files to their own personal folder,
List these files in a listBox in Flash,
Have numerous datGrids for different parts of a site. Such as 'Gallery Items', 'Demonstration Files' etc... populated with data already placed into a database or starting afresh,
Be able to edit the dataGrids using the listBox elements,
Be able to save all of this data back into the database and to know if rows in the database need either updating, leaving alone or deleting.
If anyone can help me with any of this then I would be exceptionally greatful!!
Regards,
Mark Bowen
info@kignfishergraphics.com
http://www.kingfishergraphics.com/phpBB/
Datagrid
To anyone that can assist me, thanks in advance.
I have a editable datagrid that is populated based on a combo box selection via a Web Service.
The edits made to the grid can be saved but not directly.
So it is necessary to store the modifications in an array, unfortunately the elements of the array are not been succesfully
passed back to the Web Service.
var AmendedRowNumber_Array = new Array();
- Defined at root level for the purpose of storing the modified rows of a datagrid.
The actionscript below exists within the Datagrid and is used to track edits.
When one of the cells within the grid is edited, the debugging statement _root.valueofyes1.text = "Pushed"; proves
it has been pushed onto the array.
this.editable = true;
var cellmodified = new Object();
// var AmendedRowNumber_Array = new Array();
cellmodified.cellEdit = function(event)
{
_root.valueofyes1.text = "Modified";
var col_name = _root.statementsgrid.getColumnAt(event.columnIndex ).columnName;
var myvalue = _root.statementsgrid.getItemAt(event.itemIndex)[col_name];
_root.wsmessage.text = "The value of the cell " + col_name + " was " + event.oldValue + " and is now " + myvalue + "";
var yes = {name:statementsgrid.getItemAt(event.columnIndex). confirmed, value:newValue_num};
this["ChangedCell"+col_name+(event.itemIndex)] = event.oldValue;
// _root.valueofyes.text = ["ChangedCell"+col_name+(event.itemIndex)];
// _root.valueofyes1.text = this["ChangedCell"+col_name+(event.itemIndex)];
if (_root.valueofyes1.text eq event.oldValue)
{
// _root.valueofyes2.text = "Data Identical";
}
else
{
// _root.valueofyes2.text = "Data has changed";
}
AmendedRowNumber_array.push(event.itemIndex);
_root.valueofyes1.text = "Pushed";
_root.statementsgrid.addEventListener("cellEdit", cellmodified);
}
Finally once all edits have been completed, the user clicks save.
However there appears to be a problem with the Save Actionscript.
As nothing within the for (i = 0; i < AmendedRowNumber_array.length;i++)
seems to be executing.
on (release)
{
_root.col1row2.text = _root.AccessGroup.results.User_IsTeacher
if (_root.AccessGroup.results.User_IsTeacher == true)
{
var wsSaveStatements_Complete = function ()
{
_root.wsmessage.text = "Examining Results";
if (_root.savestatements.results.Result.Success == true)
{
_root.wsmessage.text = "OK, So lets move on";
_root.wsError.text = "";
}
else
{
_root.wsmessage.text = _root.savestatements.operation + " Error";
_root.wsError.text = _root.savestatements.results.Result.Message
}
};
_root.wsmessage.text = "Setting up CandidateNameCombo";
_root.savestatements.addEventListener("result", wsSaveStatements_Complete);
for (i = 0; i < AmendedRowNumber_array.length;i++)
{
x = AmendedRowNumber_array[i];
// _root.savestatements.params.pStatement.Category_ID = AmendedRowNumber_array[i];
// _root.savestatements.params.pStatement.Comment_ID = AmendedRowNumber_array[i];
// _root.savestatements.params.pStatement.Comment = AmendedRowNumber_array[i];
_root.savestatements.params.pStatement.Subject_ID = 10001;
_root.savestatements.params.pStatement.Category_ID = 1;
_root.savestatements.params.pStatement.Comment_ID = 1;
_root.savestatements.params.pStatement.Comment = "testing Actionscript";
_root.col1row1.text = _root.savestatements.params.pStatement.Subject_ID;
_root.savestatements.trigger();
_root.wsmessage.text = "Called Trigger";
}
_root.valueofyes3.text = x;
// _root.wsmessage.text = "Waiting for SaveStatementsCombo";
}
else
{
_root.wsmessage.text = "Access To Save Denied";
}
}
Please Help With DataGrid
Hello. I've been trying to learn to use the DataGrid component for displaying data in a tabular format. So far everything works fine, but I'm having the biggest problem with customization.
I've found out how to change the background, column width, header colors, rows colors, etc... I want to know if there's a way to disable the hover effect on the rows, and if not... if there's a way to change it's color. Here is a link to what I have so far:
events2.swf
If you know much about this component that'd be awesome.
Thanks.
Lua Help And The Datagrid
ok, this is my problem, i have an array in a .lua. this is what i want to do, i want to take that array and some how make it disply in a datagrid.
the .lua file is from world of warcraft saved variables
does anyone know how to convert this array to xml, or any other format that flash use, or is there another way of doing this?
Datagrid
hi,
i want to modify the look of my datagrid. i've successfully changed the halo theme set so i now have customised scrollbars and cursor things etc. BUT i can't find how to change the green background thing when you select an entry in one of the fields (after testing the movie as a swf).
i've read some stuff on css style sheets and components but i'm not sure if that will solve the problem or that i want to get that deeply into it!!!
can i do it through the datagrid class or list class in actionscript or some other method?
cheers for any pointers,
dave.
[F8] DataGrid
Hi All,
I have created a DataGrid. The values are from XML. Is it possible to set the column as invisible.If so tell me..
Thanks in advance
Datagrid
hey guys, I have a list component populated by a datagrid. I have been using it to show selected files that are going to be uploaded to a server. It uses a fileReference to select which files to upload from the user's machine. Unfortunately, if they select too many files, then the list shows up empty. I'm assuming this is because they have exceeded the maximum length of a datagrid. Does anyone know what this max length for a datagrid is? Or have any other input as to what the problem might be. I would ideally like them to be able to select as many files at a time as they want.
Please Help With Datagrid
let's say i have a datagrid on stage.
it's made up of three columns First, Middle and Last.
my question is how do i populate all of the names(cell text values) from the datagrid to a var so that it reads like this, for example: john doe, jane doe, joe doe?
code: var my_grid:mx.controls.DataGrid;
// sample datagrid
my_grid.addItem({First:'John', Middle:'Lee', Last:'Doe'});
my_grid.addItem({First:'Jane', Middle:'Jill', Last:'Doe'});
my_grid.addItem({First:'Jack', Middle:'Joe', Last:'Doe'});
addBtn.onRelease = function() {
var names:Object = //..some code here to populate all their names from datagrid into a format like this: john doe, jane doe, joe doe;
trace(some var with populated names from datagrid);
};
please help, any help will be greatly appreciated.
Datagrid
Hello
Is it possible to add actions to a datagrid. so that when someone clicks on a row it goes to a certain frame
Cheers if you can help
DataGrid
I tried all the examples in the help file, but doesn't help.
All, I want to do is setup 5 colunms, with multiple rows. When user selects a Cell, it loads a swf files or gets a URL.
Anyone know how to do this?
DataGrid
I'm using flash 8 pro -
Is there a way I can auto size each row in my data grid so that the length of text will adjust the height of the row? Right now I'm hardcoding in rowHeight = 40; but thats gonna cut of longer text and for the rows that only have a few words...all they need is a single line.
Thanks!
Datagrid
can anyone develope the user defined data grid? I mean created by developer not in flash inbuild datagrid.
I need user defined data grid if u have any samples pls share it to me for a ref.
thanks
thil
DataGrid Bug?
Anyone see this: I'm using a grid component to display a record set returned
from MySQL using AMFPHP. It works great except when I use the embedded
scroller to scroll the grid data.
When I get to the bottom of the list, the scroller stops but if I keep
moving the mouse down, the top item showing gets duplicated down the list
repeatedly. This only happens if I use the scrollers drag button, if I use
the arrow buttons it works as it should.
I've done a little searching in Google, but haven't seen this problem
covered yet.
--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
DataGrid From XML
Hi All,
I have used DataGrid, the values are from the XML file.
The Prob is: Now I'm using Accordion Menu.In that menu, I'm having 2 child. Each child having individual DataGrid,But the values are from Same XML.
For Ex: If my menu is TableGames means The values which are having the table games node alone displayed in the DataGrid.
How I filter the XML?
Thanks in advance
SQL / PHP And The DataGrid
Hello - I have an SQL database setup which contains Herbal Information such as CommonName, LatinName, MedicalUse etc, and need to display the information in a Flash DataGrid Component.
I also have the corresponding PHP script to connect, retrieve, add and delete items from the database.
Although I am familiar with Flash in a design sense I have limited experience using Action Scripts and am unable to complete the connection myself. Should I use AS2 or AS3? Please Help - Sc3
Edited: 02/27/2008 at 09:45:00 PM by Sc3
Bug In The Datagrid?
I'm binding a datagrid to a dynamically-generated XML file and all is well, but I want to hide one column of data (the primary key). That works, too, but when I click a cell in the grid to edit, it opens the cell to the left for editing.
When the column is not hidden, it opens the cell I click in for editing. Is this a bug and is there a fix?
Thanks!
:grimey
Datagrid As3 - Please Help
Hello,
I am having difficulties with datagrid. I would like to be able to select a row and get the row index, but I do not want to edit it. (The only way I have found out so far to find the row index is to set datagrid.editable=true and then if I click a cell it is editable.)
Thanks
XML For DataGrid
I suck at this I guess...
Although I love and enjoy Flash and AS3.0 I just end up getting stuck everytime I solve a problem..
I've tried out different solutions for my problems but when I try to making it work on my problems it won't work. It work at some point but fail to keep my problems away.
After having loaded a xml-file I want the contents to be assigned to a DataGrid in the different columns that I need.
And, if possible, I want to sort the contents first by column A and then by column B.
But how do I assign the xml-contents/data to the DataGrid?
And how do I sort the data/contents in the DataGrid??
Thanks in advance.
DataGrid
Is there any way I can change the text color in my datagrid? I am looking for the simplest solution possible. I want to change all of the text to red instead of black. Any ideas on how to accomplish this?
DataGrid
How can I change the font, fontsize and color of the text inside my DataGrid component?
Attach Code
package {
import flash.display.MovieClip;
import fl.controls.DataGrid;
import fl.data.DataProvider;
public class DataGridExample extends MovieClip {
private var myDataGrid:DataGrid;
private var myDP:DataProvider;
public function DataGridExample() {
var myDP:DataProvider = new DataProvider();
myDP.addItem({Name:"Bill", Age:"45", Weight:"85"});
myDP.addItem({Name:"Bob", Age:"46", Weight:"105"});
myDP.addItem({Name:"Sean", Age:"47", Weight:"86"});
myDP.addItem({Name:"Rick", Age:"48", Weight:"95"});
var myDataGrid:DataGrid = new DataGrid();
myDataGrid.addColumn("Name");
myDataGrid.addColumn("Age");
myDataGrid.addColumn("Weight");
myDataGrid.dataProvider=myDP;
myDataGrid.width=400;
myDataGrid.move(10, 10);
myDataGrid.resizableColumns=true;
myDataGrid.headerHeight=20;
addChild(myDataGrid);
}
}
}
DataGrid
Hi,
I have a problem with styling DataGrid component. I'm using Flash CS4 Professionsl and AS3. The problem occurs when editing cells the font size is different (smaller) than not editing. The included code is last example from here
http://www.adobe.com/devnet/flash/quickstart/datagrid_pt2/#section9
which i have modified a bit (font size and put the dg as editable) to show the problem. Try this example and change the values on the cells, so you'll see the problem.
I hope someone has figured out this problem.
Regards
a.u.jentze
Attach Code
import fl.controls.DataGrid;
import fl.controls.dataGridClasses.DataGridColumn;
import fl.data.DataProvider;
var comicTextFormat:TextFormat = new TextFormat();
comicTextFormat.font = "_sans";
comicTextFormat.size = 18;
var comicBoldTextFormat:TextFormat = new TextFormat(comicTextFormat.font);
comicBoldTextFormat.bold = true;
var dp:DataProvider = new DataProvider();
dp.addItem({columnA:"Row 1A", columnB:"Row 1B"});
dp.addItem({columnA:"Row 2A", columnB:"Row 2B"});
dp.addItem({columnA:"Row 3A", columnB:"Row 3B"});
var colA:DataGridColumn = new DataGridColumn("columnA");
colA.headerText = "Column A:";
var colB:DataGridColumn = new DataGridColumn("columnB");
colB.headerText = "Column B:";
var myDataGrid:DataGrid = new DataGrid();
myDataGrid.editable = true;
myDataGrid.setStyle("headerTextFormat", comicBoldTextFormat);
myDataGrid.setRendererStyle("textFormat", comicTextFormat);
myDataGrid.addColumn(colA);
myDataGrid.addColumn(colB);
myDataGrid.dataProvider = dp;
myDataGrid.width = 200;
myDataGrid.rowCount = myDataGrid.length;
myDataGrid.move(10, 10);
addChild(myDataGrid);
DataGrid
I have a Datagrid that gets populated with external numbers. Is there a way to color the negative number
Red ?
i.e.
3241
-4363
-4785
23340
I will not know before which row will be negative or positive.
Please please Please HELPPPPPPP
Thanks,
Datagrid And Xml
Hi there,
Is it possible to arrange rows in a datagrid. ie can I swap id 6 in my datagrid and move it to number 1 on the list.
I have an eventhandler on my button (Alert) which tells me what I have selected. I suppose I should use the same type of event handler to shift stuff around.. but i am a bit stuck ?
Can post code if needed.
Any sug..
Thanx
DataGrid Bug?
I am tryng to create a dynamic datagrid that receives dynamic columns:
PHP Code:
for (i=0; i<DadosModelos.total_produto_modelo_recebe; i++) {
var coluna:DataGridColumn = new DataGridColumn();
coluna.width = 75;
_root.ContentMc.DgMc.addColumnAt(i,eval("DadosModelos.nomemodelo"+i));
}
so far so good...
Now i want to add a row that receives a value for each column that i add dynamic above, i tried all but nothing...Why its not possible to do that???
Help With DataGrid
Hi guys.
I am using an XML connector and a datagrid to display some data on the stage.
I have added a listener to the dataGrid to allow the user to click on cell.
When the user clicks a cell the data in the cells of that row will be stored in global variable.
Here is my code below. When I try to trace the global variable i get an undefined. Can anyone explain why please and offer some help
this.msgConn.trigger();
// Create listener object.
var dgListener:Object = new Object();
dgListener.cellPress = function(evt_obj:Object) {
var contactCol = 0;
var textCol = 1;
var rowIndex = evt_obj.itemIndex;
_global.contactName = evt_obj.target.selectedItem.contactCol;
_global.msgContent = evt_obj.target.selectedItem.textCol;
trace(_global.contactName);
trace(_global.msgContent);
};
// Add listener.
inbox_dg.addEventListener("cellPress", dgListener);
Any help is much appreciated.
Thanks
Stew
[AS]DataGrid And Row Id
Hello guys,
I have a little problem, i have a datagrid that it's populated from a XML file.
The XML structure is this:
PHP Code:
<data> <row url="print_news.php"> <id>"x"</id> <data>"MM/DD/YYYY"</data> <news>"message"</news> </row> <row url="print_news.php"> <id>"x"</id> <data>"MM/DD/YYYY"</data> <news>"message"</news> </row><data>
-"x" = it is added automaticaly from the datebase;
-"MM/DD/YYYY" = it is added automaticaly from the datebase;
-"message" = it is taken automaticaly from the datebase;
The XML it is created by a php script.
In the swf i have the datagrid with cellrenderer API.
My question is:
I want when i click on the first news(row,id) on the datagrid to call the print_news.php and take the id = 1 (the id that corespond to the datagrid row).
Do you think you can help me with this?
P.S. If you want more details ask me, in first post i don't know what you need?
Datagrid
can anyone develope the user defined data grid? I mean created by developer not in flash inbuild datagrid.
I need user defined data grid..
thanks
thil
CSS For A DataGrid
I'm attempting to control text color of datagrid cells using a CSS file and I think I just hit a dead end.
I've extended the CellRenderer with
Code:
dgGrid.setStyle("cellRenderer", CustomRenderer);
Within the CustomRenderer class, I set a stylesheet to the cell's text field with
Code:
this.textField.styleSheet = cssSheet;
And upon running the code, I get this error:
Error: Error #2009: This method cannot be used on a text field with a style sheet.
at flash.text::TextField/setTextFormat()
It's referring to the cell's text field. I am not applying a text format to the text field, so I can only assume this is some automatic thing that the DataGrid does.
Anyone know a way around this?
Please Help With Datagrid
let's say i have a datagrid on stage.
it's made up of three columns First, Middle and Last.
my question is how do i populate all of the names(cell text values) from the datagrid to a var so that it reads like this, for example: john doe, jane doe, joe doe? :confused:
ActionScript Code:
var my_grid:mx.controls.DataGrid;// sample datagridmy_grid.addItem({First:'John', Middle:'Lee', Last:'Doe'});my_grid.addItem({First:'Jane', Middle:'Jill', Last:'Doe'});my_grid.addItem({First:'Jack', Middle:'Joe', Last:'Doe'});addBtn.onRelease = function() { var names:Object = //..some code here to populate all their names from datagrid into a format like this: john doe, jane doe, joe doe; trace(some var with populated names from datagrid);};
please help, any help will be greatly appreciated.
XML To DataGrid
I want to load XML data at the DataGrid but not all the data but only some of them with a specific id . something like that in mySQL
SELECT * FROM data WHERE type=1;
DataGrid
I have a Datagrid that gets populated with external numbers. Is there a way to color the negative number
Red ?
i.e.
3241
-4363
-4785
23340
I will not know before which row will be negative or positive.
Please please Please HELPPPPPPP
Thanks,
Datagrid And Xml
Hi there,
Is it possible to arrange rows in a datagrid. ie can I swap id 6 in my datagrid and move it to number 1 on the list.
I have an eventhandler on my button (Alert) which tells me what I have selected. I suppose I should use the same type of event handler to shift stuff around.. but i am a bit stuck ?
Can post code if needed.
Any sug..
Thanx
AS3 Datagrid Help
Wow! AS3 makes it really easy to skin dataGrids.
There are only two things I can't figure out:
Fields are appearing in Random Order.
how to change the font size, and other characteristics.
Thank You for your help.
Actionscript Code:
function dataGridFunction() {
var characters:Array = new Array(
new Array("Ad26.ENVA.01", "", "VIRAL VECTOR","","","","38"),
new Array("DVP-1", "DNA","","","","Ad26.EnvA-01;#115","40"),
new Array("EnvDNA", "","","","","EnvDNA;#116;#EnvPro;#118","3")
);
//
for (var i:Number = 0; i < characters.length; i++) {
var num:String = characters[i][0];
var phase:String = characters[i][1];
var boost1:String = characters[i][2];
var boost2:String = characters[i][3];
var product:String = characters[i][4];
var volunteer:String = characters[i][5];
dataGridMain.addItem({NUMBER:num, PHASE:phase, "BOOST 1 CLASS":boost1, "BOOST 2 CLASS":boost2, "PRODUCT(S)":product, VOLUNTEER:volunteer});
}
}
dataGridMain.setStyle("fontSize", 8);
dataGridFunction();
How Can I Get The Value From Datagrid
ActionScript Code:
dg.dataProvider = tmp;
dg.dataProvider = tmp;
"dg" is a datagrid,I can give the values to the datagrid,but I wanna know how to get the value from the tmp one by one
I guess tmp is a array, it isn't working when I use "tmp[0]"
i hope that someone can tell me the way to get the value from "tmp"
thanks
Datagrid AS3
I need to access a datagrid's cell contents upon click.
this is what i have thus far.
grid.addEventListener(DataGridEvent.ITEM_EDIT_END,end);
function end(event:DataGridEvent)
{
event.I_NEED_THE_CONTENTS_HERE_BUT_CAN'T_PATH_IT!!!
}
i would think this is easy but there is virtually no documentation on this...
Datagrid And Xml Bug
when i load my datagrid like so, i can't highlight the entries. any clues?
Code:
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
grid.editable = true;
grid.setStyle("alternatingRowColors", [0xdddddd, 0xffffff]);
var node = this.firstChild.childNodes;
for (i = 0; i < node.length; i++)
{
grid.addItem(node[i].attributes);
}
};
xml.load("xml.xml");
xmlCode:
<?xml version="1.0" ?>
<Addresses>
<item first="Ryan" last="M" middle="Prentice" address="1125 Shomewhere Rd" city="Lexington" state="KY" />
<item first="Kristen" last="E" middle="Jean" address="280 Somewhere" city="Lexington" state="KY" />
<item first="Ryan" last="M" middle="Prentice" address="555 Test st" city="Lexington" state="KY" />
</Addresses>
Datagrid Bug?
Is there a certain set number of items I can put into a datagrid?
Flash won't allow me to do past a certain number, and it is kind of key for me to do so: I have around 200 users that I need to list out in a sortable index inside of Flash. I assumed that the Datagrid would be my best bet, but if I can't get this to work, I'll have to improvises something dumb.
Code:
import mx.controls.DataGrid;
var aData:Array = new Array();
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {
var nodes:Array = xml.firstChild.childNodes;
for (var i = 0; i<nodes.length; i++) {
aData.push({Number:nodes[i].attributes.number, Name:nodes[i].attributes.name, Status:nodes[i].attributes.status});
}
agentList.dataProvider = aData;
};
xml.load("http://ateamministries.com/php/agentxmlprint.php");
_global.style.setStyle('themeColor', 'haloBlue');
The php file prints the XML, all of it, I checked. Something in Flash is giving me trouble
DataGrid For Flash MX?
I've heard that there exists a Beta DataGrid for Flash that in some ways mimics HTML Tables. Does anyone have a URL to the beta?
(All I've found is references to the Dreamweaver DataGrid, which I suppose has nothing to do with flash. Anyway I and a few others on this forum are curious about it.)
-Matt
DataGrid Wordwrap
Can the Datagrid Component support Wordwrap?
I am trying to determine if it can handle more text in a column by word wrapping the text and increasing the size/height of the row.
Datagrid And GetSelectedItems()
Hey I have the datagrid working great but i need to populatetwo fields whn you select any row with that rows data. Any Ideas what i'm doing wrong?
Code:
function getServiceCode_Result(sct_availability) {
// fill the grid with data
grid.setDataProvider(sct_availability);
theResult.text = "done";
gridLength = grid.getLength();
if (gridLength>1) {
///????????????????????????????????
var myItem = grid.getSelectedItem();
trace("test" + myItem)
trace(myItem[1].text.str_hotel_name)
name_txt.text = myItem.text.str_hotel_name;
code_txt.text = myItem.text.str_hotel_symbol;
grid._visible = 1;
///?????????????????????????????
} else if (gridLength == 1) {
topRecord = grid.getItemAt(0);
name_txt.text = topRecord.str_hotel_name;
code_txt.text = topRecord.str_hotel_symbol;
} else {
error = true;
}
// call the service and pass the id
}
|