Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Smoother Text For Datagrid Component



Is it possible to use smoother text, perhaps with the antiAliasType -> normal or advance feature for flash 8? I tried to use this technique in several ways, i.e.... my_dg.setStyle("antiAliasType", "advanced");ormy_dg.getColumnAt(0).setStyle("antiAliasType", "normal"); ormyTextField_txt.antiAliasType = "advanced";and none of them work. please help - thanks :)



Adobe > ActionScript 1 and 2
Posted on: 08/12/2007 09:13:47 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Is There A Way To Wrap Text In The DataGrid Component?
Is there a way to wrap text in the DataGrid component?

[CS3] Datagrid Component Not Displying Text Properly
Hi guys,
I only started messing with the CS3 components today.
Everything was going well untill i noticed that some of the text is being aligned to of the mc where as others are being centered.
Anyone know how i can fix this. I did modify the component but i did not come across any textfields.

Smoother Text Movement
Hi everybody,

I have a small question. I made a site sometime ago - Sookerating. If you visit the site you will small phrases of text scrolling about on the top of the page. The entire sequence runs on AS. You will also notice that the text movement is choppy. Is there a way I could achieve the same effect...only in much smoother way. I thing the text is not anti-aliased too which is giving the letters a crude effect.

Any suggestions anyone?

Thanks in advance guys.

How To Make Text Scroll Smoother
Can anyone help me make my dynamic text box scroll smoother? My Flash document is set at 30fps and I use the 'onEnterFrame' method so surely the text should scroll smoothly?!

My movie is at http://www.joesmalley.com/news/news.html and the source is at http://www.joesmalley.com/news/news.fla

Or is it because of the text length that's jerking the scrolling?

Text Scroller Download Can You Make Smoother Scrol
If I give you this text scroller download can you make it scroll smoother? Thats the challenge I havent seen one roll smoothe yet. Can you apply some code to make it scrol in small pixel amounts and speed as well? So that it rolls up or down the screen the same as movie words scrol on the TV screen?

http://www.geocities.com/jaffasoft2/texscroller.fla

Datagrid Component Vs. Dataprovider Component ?
could someone help me out here? i am attempting to use some methods on my datagrid, but for some reason only one method is functioning.

by methods i mean this:

(DataGrid component)
myDataGrid.getColumnAt(index).width
myDataGrid.removeAllColumns()

(DataProvider compnent)
myDP.removeAll()

here is what i did:
Code:

drag and drop a datagrid component onto stage
give it an instance name of quiz_dg




here i call a function that populates an array (1 row) and assigns the array to my datagrid:
Code:

function doll(blah) {
   toy();
   quiz_dg.dataProvider = test;
}



this is my function to populate the array:
Code:

var test:Array = new Array();

function toy(blah) {
test.addItem({Tmp1:tmp1,
      Tmp2:tmp2,
      Tmp3:tmp3,
      Tmp4:tmp4,
      Tmp5:tmp5,
      Tmp6:tmp6,
      Tmp7:tmp7});
   return test;
}



so here is my dilema:
Code:

no matter how i add code to manipulate my quiz_dg, none are recognized, i did figure out that some methods, manipulate the datagrid, and the same methods do not affect the dataprovider what so ever, thus the reason for having two different methods to clear a datagrid.


DataGrid Component:
Code:

you can use myDataGrid.removeAllColumns(), but it also tells me this:

Calling this method has no effect on the data provider.  Call this method if you are setting a new data provider that has different fields from the previous data provider, and you want to clear the fields that are displayed.

so i had to use myDP.removeAll() to clear my datagrid


here is what i did to use myDP.removeAll():
Code:

drag and drop a datagrid component onto stage
give it an instance name of quiz_dg

function doll(blah) {
   toy();

   test.removeAll();  //clear previous items
   quiz_dg.dataProvider = test;
}

var test:Array = new Array();

function toy(blah) {
test.addItem({Tmp1:tmp1,
      Tmp2:tmp2,
      Tmp3:tmp3,
      Tmp4:tmp4,
      Tmp5:tmp5,
      Tmp6:tmp6,
      Tmp7:tmp7});
   return test;
}




so what i would like to use is:
Code:

myDataGrid.getColumnAt(index).width


any help is greatly appriciated....
ra2833

Please Help With DataGrid Component
i need to make colums with more then one line in the dataGrid component

is it somehow possible to make the textfields multiline, word wrap depending on width

i tried a few hours, please help me

it must be somehow possible

urgent

thx for help

DataGrid Component
Hey,
i am trying to set movie clip as a substitute header for the column(dataGrid Component). For some reason i can't figure it out. Nothing is showing up, i don't quite understand how to connect new column with existing dataGrid. Thanks

gridColumn = new FGridColumn("First");
gridColumn.setHeader(header);

Help With DataGrid Component
I just bought the Macromedia DataGrid component, and I'm trying to get used to it. However, I cannot get the thing to work. I dragged an instance onto the stage, named it 'grid' and then entered the following script:

arrData = new Array();
arrData[0] = {Type:"Cat", Description:"Black", Name:"Bob"};
arrData[1] = {Type:"Snake", Description:"Green", Name:"Fred"};
arrData[2] = {Type:"Dog", Description:"Brown", Name:"Magnus"};

grid.setDataProvider(arrData);



According to the documentation, the component should set itself up with column headers and data. It does not. However, it does create 3 columns, which suggests that it is able to get some sort of information about the objects in the array. Also, if I click around a little and then click on the blank column headers, I can get the component to highlight some (blank) rows. Interestingly, it will only highlight one of the top 3 rows, suggesting it knows there are 3 elements in the array. However, grid.getRowCount() returns '0'.

Any suggestions would be appreciated.

Datagrid Component
hello

i am portuguese and my english is no goog...sorry


i want to ask a question..

where can i get a FLA opensource datagrid component or sample, to list a rows in the database?

thanks aquiles boiça

Datagrid Component Help
Hi...

Thanks for reading...

Here's the deal...I've got a datagrid component in Flash MX loading arrays from a text file. Everything is cool with the look of the grid and the loading of the data.

The application I'm looking to build is a basic album reviews database. The data is artist names, album names, album grade and a hidden field of the album's review URL.

I need to popup a window with an album review for each album listed in the datagrid.

I'm not an actionscript expert, so I'm looking for help with getting the URL from the array and into a getURL command. I'm sure it's not too difficult, just I can't figure it out easily. I'll post my fla if someone needs it.

Thanks in advance.

Help:Using The DataGrid Component
Hi

I am using flashMX 2004. I want to use the DataGrid component to return multiple records using PHP from a MySQL database. I know how to return variables from php to flash and how to send the variables from flash to php, but i am really new to the components.
I also dont know XML, so i need to find a way of using it without XML.

Any kind of help will be appreciated.
Thanks

Datagrid Component...(looking For)
I didnt think this really qualified for the 'cool sites' looking for type thread... so I posted here.

Im looking for any examples where the datagrid was used in an application/website.

wondering how mouch control you actualy have over it both progmatically & visually. row hieght, font..etc.. color/fills for cells... sort/order...etc..

so if anyone can link to some nice examples...tutorials.. (not so much how to use them..ie: link to dataProvider..etc)..but HOW they were used...and HOW they look.

thanks

[F8] DataGrid Component
Is there a way to seperate your rows with lines using the dataGrid Component, and if so, how?

DataGrid Component
I have a data grid component that populates dynamically and I want the first item in the list to be selected by default, any thoughts?

THANKS!

DataGrid Component
The data within the DataGrid Component is embedded inside the actionscript of the fla file? I was wonder how I could load that same information externally. With a .txt file, for example.

The DataGrid is on the "Home" and "News" pages.

Also, for some reason the only way the DataGrid can be seen is if the you click on the page directly from the home page. If you try to get to if from any other page, if wont load. Anyone know the reason for this?

You can view the site here: http://www.nataliewachen.com/index2.html
Or if you want to take a look at the files: http://www.nataliewachen.com/help.zip

The DataGrid Component
I have a cellrenderer with which works on a Datagrid component, and loads a combobox into each cell in one column of the datagrid.

Problem is, i can't seem to access it.

How would I access that combobox in each cell? How would I set their initial values?

Mine is based off this one:

http://forums.flashgods.org/as3-comb...grid-t527.html

V3 DataGrid Component
The number of items added to the component doesn't seem to affect the scroll speed.

But how many rows are showing, aka how tall is the component is what makes a difference.

With a component of 10 columns, more than 12 rows and I start to see the scroll lag.

How about you? Can you beat that?











Attach Code

var Max:int = 100000;

daterGrid.columns = [ "column1", "column2", "column3", "column4", "column5", "column6", "column7", "column8", "column9", "column10" ];

for(var i:int=0;i<Max;i++)
{
daterGrid.addItem({ column1:"ThisIsRow"+i, column2:"ThisIsRow"+i, column3:"ThisIsRow"+i, column4:"ThisIsRow"+i, column5:"ThisIsRow"+i, column6:"ThisIsRow"+i, column7:"ThisIsRow"+i, column8:"ThisIsRow"+i, column9:"ThisIsRow"+i, column10:"ThisIsRow"+i });
}

























Edited: 07/13/2007 at 02:15:09 PM by cayennecode

DataGrid Component
I have a datagrid that I would like to display multiple rows per item.

Example Data
<row><firstname>Joe</firstname<lastname>Blow</lastname><city>Bellevue</city><state>WA</state></row>

I want to display it in a datagrid like this:

Joe Blow
Bellevue WA

Is this possible?

thanks,
Victor







Attach Code

Joe Blow
Bellevue WA

Datagrid Component
All,

I'd like to be able to connect a Datagrid component with data in an Access
DB using ASP scripting middleware. Has anyone successfully used datagrids
in that manner? I'd be interested in learning how successful it was,
problems encountered, and so forth.

TIA,

Marc Lee
Denver CO

CS3 Datagrid Component
There has to be some way to get an html link to work in a CS3 Datagrid. I can't find anything on html links using Flash CS3 and Actionscript 3, which seems pretty remarkable to me. I'm surprised Adobe didn't code the datagrid to recognize when an html link is being clicked in the grid.

I've spent the last couple of days trying to do this with no success. I've emailed Adobe and received no response.

Has anyone successfully gotten an html link to work in a CS3 Datagrid? If so, please share.

How To Use The DataGrid Component ?
Hello everybody

I'm currently building an application in Flash to display and edit values from different tables and databases in MySQL. I'm at the point to display the entries in Flash, and I thought I'd use the DataGrid component for this.

But how do I use this ? I have the arrays with the values, I have the array with the column names, but how do I get the DataGrid component to display the values of these arrays ? I've been reading in the manual, but it didn't give any good examples of how to do this.

Can anyone tell me how to use this component ?

DataGrid Component Use
Hi. I'm a teacher who runs a history website. On it I have a few basic Flash games. See http://www.schoolhistory.co.uk/games/

As I've added more and more topics, I've tried to develop a Flash-based interface to allow easy selection. See http://www.schoolhistory.co.uk/games/walk/

However, the one I've currently done is too clunky and doesn't work brilliantly. I have Flash MX 2004 Pro and am looking at using the DataGrid component instead. Trouble is, most schools only have Flash 6 installed and I don't want to require Flash 7.

My aim is to have a large index like this with all the game topics on - allowing anyone to select a game quickly and easily.

Any ideas how I could do this better or more effectively?

DataGrid Component
I have a data grid component that populates dynamically and I want the first item in the list to be selected by default, any thoughts?

THANKS!

How To Use The DataGrid Component ?
Hello everybody

I'm currently building an application in Flash to display and edit values from different tables and databases in MySQL. I'm at the point to display the entries in Flash, and I thought I'd use the DataGrid component for this.

But how do I use this ? I have the arrays with the values, I have the array with the column names, but how do I get the DataGrid component to display the values of these arrays ? I've been reading in the manual, but it didn't give any good examples of how to do this.

Can anyone tell me how to use this component ?

DataGrid Component Use
Hi. I'm a teacher who runs a history website. On it I have a few basic Flash games. See http://www.schoolhistory.co.uk/games/

As I've added more and more topics, I've tried to develop a Flash-based interface to allow easy selection. See http://www.schoolhistory.co.uk/games/walk/

However, the one I've currently done is too clunky and doesn't work brilliantly. I have Flash MX 2004 Pro and am looking at using the DataGrid component instead. Trouble is, most schools only have Flash 6 installed and I don't want to require Flash 7.

My aim is to have a large index like this with all the game topics on - allowing anyone to select a game quickly and easily.

Any ideas how I could do this better or more effectively?

Datagrid Component Get Value
What function would I use to get the data from a row in one datagrid and to insert it into another?

Help is greatly appreciated!

DataGrid Component Example Online
FYI, I have put up an example of the DataGrid component online:
http://radio.weblogs.com/0106797/2002/09/10.html#a269

The datagrid component is avaliable as part of the:

Developer Resource Kit
http://www.macromedia.com/software/drk/

mike chambers

mesh@macromedia.com

DataGrid Component In Asp Page
Hi all. I'm trying to use the DataGrid component in a movie that's an object in an asp page. It works fine if I do it in an html page, but when I try it in the asp page, I get an error message saying, "A script block cannot be placed inside another script block."

Does anyone know what might be causing this, and how I can fix it? Thanks in advance...

Checkbox In DataGrid Component
Hey all,

I have searched the documentation to no avail. Maybe one of you can help.

I have a dataGrid component that has a column named "Remove". I use .setCellSymbol() to make that column use checkboxes to represent the boolean values. However, when I do this it becomes impossible to edit the value. The editHandler that I set with .setEditHandler executes when I edit a text field, but not when I check/uncheck a box. Also, when I loop through the rows, the original boolean value is returned, not what I checked or unchecked.

Any ideas as to how to make the changes to the checkbox carry over to the data?

Thanks in advance.

DataGrid Component: Faster Mod Out There?
Is anyone aware of a faster dataGrid component than the one from Macromedia. Perhaps a modification of the exisiting one or a different component altogether or script?

As it is its a little too slow for what I need although useful in its feature design.

Thanks in advance for any help! I'm on a bit of a short deadline. (as always).

Flash Component: Datagrid
Hi,

Can anyone explain to me how to implement the .setCellData command in a datagrid?

Obviously, I want to change the data within one particular cell, but I am unaware of how to precisely address a particular cell.

The help files inform you of this:

dataGridInstance.setCellData(index, colName, data)

Parameters:

index An integer. // to address a row???

colName A column name. // I didn't think the columns had names????

data A piece of data. This parameter can be a string, Boolean, number, or object.



Any suggestions on how to tackle this would be greatly appreciated.

DataGrid Component Question - Need Example
Greetings!

I am trying to add an FComboBox to a cell in an FDataGrid instance, similar to what you see here:

http://radio.weblogs.com/0106797/drk/dg_1.html

(except the check boxes should be combo boxes)

Can anyone provide me with a simple example of how to do this? I'm currently using addItem( myArray ) to add rows to my DataGrid, and I tried using setCellData( index, colName, ComboBoxObject ) to achieve what I needed, but I couldn't get it working.

Thanks!

Print From Datagrid Component?
Can someone tell me how I can print all of the contents displayed in a datagrid component when the content requires scrolling?

Thanks.

Flash MX Datagrid Component
I am having trouble sorting the data grid.

I have a date stored in a column but when I sort it sorts the dates alphabetically. Any one know how to sort a date?

Also is it possible to send in html tags to a column. I need to send a string into a datgrid column and only some of the data needs to be bolded. Can I do this?

DataGrid Component Question(s)
I am extracting data from an XML doc and loading them into a datagrid using the following code:

for (k=0; k<L2; k++){
// For each line in the dataset... (23)
var rowData = new Array();
// Pick up the attributes and place in a line array
ln = 0;
for (attr in level2Child[k].attributes){
rowData[ln] = level2Child[k].attributes[attr];
ln += 1;
}
// Now add two fields to the end of the array for prev data
rowData[ln] = k;
rowData[ln+1] = k+1;
// Place the line array into the current data array
setData[k] = rowData;
// Delete the line array and go get the next line
delete rowData;
}

This all works fine. However, when the data is sent to the datagrid, the columns come out in reverse order. ie: colums 1,2,3,4,5 are displayed as 5,4,3,2,1. Even if I reverse the counter to load the data in reverse, it comes out the same.

The odd thing is that the column labels attached to the grid all come out correctly.

Any thoughts?

Thanks

WTG

DataGrid Component With Pictures
Hi everyone,

I'm trying to dispaly pictures within Data Grid component. I know I need to write my own class and use it with the CellRenderer interface, but it just does not work... If anyone done it before or can direct me to any code that would do it it will be greatly appreciated.

Thanks for your time,
Peter

XML Socket And DataGrid Component
trying to make changes to an xml document and stream that info, in realtime, to a DataGrid component instance. here is what i have tried:

1st attempt.
i was able to get the DataGrid component to work with the xmlConnector component, but it requires a click event to update. to avoid the click event, i added some extra frames and had the load function triggered with each play head cycle, but it was killing the processor on my machine. i mean killing it.

2nd attempt.
created a new xml object and connected with a xml socket. this worked but only by creating individual variable text fields for the xml data... and i need the display to be more flexible than that, since it could be changing frequently. what i really want is the socket to connect and stream the xml info to DataGrid component instance. but i cannot get the xml object i created to bind with it. it doesnt show up in the "binding" inspector.

so, how can i connect a DataGrid component to a remote xml document, with an xmlSocket? anyone have a link? I looked thru the help files and this forum, but i cannot seem to figure it out.

DataGrid Component Problem
Hi everybody,
I have a problem with the Datagrid component.
I used this to pass variables to the component:
code:
test_array = [{user:"Dimitris"}, {user:"Thalus"}, {user:"Pitros"}, {user:"Axristos"}];
list_grid.dataProvider = test_array;

This works great but i can`t find out wich item the user select.
I used a button with this script in it:
code:
on (click) {
trace(_root.list_grid.selectedItem);
}

But when i click the button it only returns this : "[Object] [Object]"
How can i return the true value of the user selection?
I can do it with the selectedIndex command but it will be a mess and more difficult to accomplish it.

How To Sort A Datagrid Component?
Hey,
Let's say I have 3 columns (Name, Description, Count)
I want to sort the "Name" column alphabetically... which is easy

Now here's the tricky part:
If 2 names are alike in the "Name" column, it needs to default to the "Description" column and sort them alphabetically by description. Same deal for the "Count" column: If a name and description are the same, it would have to sort them alphabetically(numerically) by the "Count" column.

Here's an example:

BEFORE SORT
Shaquanda | Scary | 53
Roofus | Ugly | 24
Timmy | Silly | 43
Roofus | Narsty | 54
Timmy | Silly | 34

AFTER SORT
Roofus | Narsty | 54
Roofus | Ugly | 24
Shaquanda | Scary | 53
Timmy | Silly | 34
Timmy | Silly | 43

Any thoughts?

DataGrid Component Customization
Hi,

I have a datagrid component in which im showing a list of rooms along with some details. i want to do 2 things that i really need some help with

1. I want some of the rows to have a seperate text color for for highlighting purpose. I tried to add html tags with my text but doesnt help.

2. I want a field in my grid that will not show text in it, instead it will show a specific icon based on the data i provide it. Now I know u can do this in the List component but Im having no luck in implementing the same code for the datagrid.

Please let me know anything u may think would be useful for me.

Best Regards
Ali Kapadia

Print A DataGrid Component
Hello,

I created a user history log, it tracks what the user has been clicking on, using a DataGRid. It works great. Now I need to print it out. It will print but once the DataGrid gets so large it scrolls I cannot print the unseen data.

The DataGrid is in a movie clip, gridWindow, and I'm just using print.

printIcon.onRelease = function() {
print("_parent.gridWindow", "bframe");
//print("_parent.gridWindow", "bmovie");
//print("_parent.gridWindow", "bmax");
}

All the above above types print out the same.

Is there a way to print all pages of the DataGrid? Should I convert it to something like a txt doc or HTML and then print that?

Thank you in advance!

Skinning Datagrid Component
Hi there,
I am working on a project in which data will be fetched via php and then should be displayed as a vertical list. I am using Datagrid Component, my ques is: is it possible to dynamically dispaly data thru php in a Datagrid comp; if yes, how? And how to skin this comp so as to match the design that I am attaching here. The design is of the scrollbars only, the background should be grey.
Pls help me out.

Skinning Datagrid Component
I'm trying to customize the datagrid component. I've gone through skinning tutorials online and what little there is in Macromedia's own docs. My biggest complaint is that the SampleTheme.FLA file they provide as an example doesn't even work with the datagrid. In the sample theme file, they've changed the background header graphic but it doesn't actually change a datagrid component's header background (it still uses the deafult Halo theme when rendered). I'm not sure how they expect users to skin components if they can't get it right themselves.

OK - sorry. Done with my griping. Back to the issue.

Has anyone tried skinning a datagrid? Here's what I did:

- created a new doc
- dragged a datagrid onto the stage (this happens whether the datagrid is attached to a dataprovide or not),
- open the SampleTheme.FLA's library as an external library (in this file, the datagrid asset for the background graphic has been changed)
- dragged in the Flash UI OCMponents 2 folder to my original doc
- exported
- Results: the border and scrollbars of the datagrid change, but not the headers. Those still have the Halo theme applied.

My guess is that somewhere in the component actionscripts, the headers are not "listening" to the new graphics. Does anyone have any idea what this could be?

AAARGH! I'm just a designer.

Reaching DataGrid Component In Swf
hi, i have a fla, there is a scrollPane in it and I load a swf into the scrollPane. there is a dataGrid in this swf and I must to reach this dataGrid to take a data from it, how can i reach it as if reaching something in movie clip...

Flash 2.0 Datagrid Component Bug ?
Recently I found a bug in Datagrid component. The swf file which contain datagrid act differely in IE 6, and IE 7.
This is what I've done:
1) Compile swf, export it together with html file.
2) Run the html file
3)Press on one of the cell,drag it and then release it outside of the browser/flash canvas.
4)Move the mouse pointer back to flash canvas
5)The grid will scroll automatically( move the move up and down to test)
6)After a few times mouse pointer movement, suddenly IE crash, CPU usage 100%

I have tested the swf file on firefox 2.007 and stand alone flash player, however, none of the flash player have this bug. Therefore I suspect that the ActiveX flash plugin for IE cause this bug.

----------------------------------------------------------------------------------------------------------------------

This is the source code, which I use to create the datagrid for testing.
ps: open one fla file, drag datagrid component from component panel to the stage or it will not run.

import mx.controls.DataGrid;

var header = "Stock Code/
Name,Type,Status,Order Date
Time,Duration,OrderQty/
Price,Matched Qty/
Price,Trd Curr/
Matched Value,Account No/
Order No";
var wid = "90,43.2699356842522,91.5969497381748,87.4747020181826,60.4473499934867,67.9851014914014,90.2231829093762,111.8984058876167,134.104372277509";
var alig = "left ,left, left , left , left , right , right , right , left ";
var halig = "center ,center,center , center , center , center , center , center , center ";
var fxdata:Array = new Array();
fxdata[0]= new Array("67676 GPACKET","Buy","Expired","05/09/2007 06:04:20 PM","Day","200 4.34","0 0.00","MYR 0.00","423423423432");
fxdata[1]= new Array("054066 FASTRAK","Buy","Expired","05/09/2007 01:45:18 PM","Day","47,900 0.27","0 0.00","MYR 0.00","fdsfsdfsdf");
fxdata[2]= new Array("737013 HUBLINE","Sell","Expired","05/09/2007 11:53:19 AM","Day","400 0.69","0 0.00","MYR 0.00","93743");
fxdata[3]= new Array("31474 L&G","Buy","Expired","03/09/2007 11:35:35 AM","Day","500 0.70","0 0.00","MYR 0.00","389dskjfsd");
fxdata[4]= new Array("38182 GENTING","Buy","Expired","28/08/2007 11:38:59 AM","Day","500 7.35","0 0.00","MYR 0.00","90sklsdakl");
fxdata[5]= new Array("05005 PALETTE","Buy","Expired","28/08/2007 11:08:23 AM","Day","500 0.115","0 0.00","MYR 0.00","jsdaflk;as");
fxdata[6]= new Array("093082 GPACKET","Buy","Expired","27/08/2007 03:49:43 PM","Day","300 3.82","0 0.00","MYR 0.00","jsdafj;sda");
fxdata[7]= new Array("644769 KELADI","Buy","Expired","27/08/2007 11:05:36 AM","Day","10,000 0.30","0 0.00","MYR 0.00","jsadjf;lkdas");
fxdata[8]= new Array("676653 KASSETS","Buy","Expired","24/08/2007 06:15:33 PM","Day","500 2.93","0 0.00","MYR 0.00","jlsdf;adas");
fxdata[9]= new Array("473323 JAKS","Buy","Expired","23/08/2007 04:45:03 PM","Day","100 0.915","0 0.00","MYR 0.00","jjkljsdlfasd");
fxdata[10]= new Array("03069 IPOWER","Buy","Expired","22/08/2007 10:18:01 AM","Day","9,800 0.365","0 0.00","MYR 0.00","jlajsd;lfjads");
fxdata[11]= new Array("05025 LNGRES","Buy","Expired","21/08/2007 03:08:06 PM","Day","9,900 0.28","0 0.00","MYR 0.00","jlkjsdafl");
fxdata[12]= new Array("01308 N2N","Buy","Expired","21/08/2007 10:34:51 AM","Day","200 1.71","0 0.00","MYR 0.00","mjkjadsflasd");
fxdata[13]= new Array("70069 IPOWER","Buy","Cancelled","21/08/2007 10:02:08 AM","Day","0 0.37","0 0.00","MYR 0.00","jkjasd;fsda");
fxdata[14]= new Array("03069 IPOWER","Buy","Cancelled","20/08/2007 07:20:54 PM","Day","0 0.38","0 0.00","MYR 0.00","jkjsdlkfjsdaf");
fxdata[15]= new Array("12651 MRCB","Buy","Replaced","20/08/2007 05:31:59 PM","Day","900 2.35","0 0.00","MYR 0.00","upuewoirwe");

var mdtgrid:DataGrid;

_root.createEmptyMovieClip("displayobj1", _root.getNextHighestDepth(),{_x:0,_y:0});
initial();
function initial(){
_root.mdtgrid = _root.createClassObject(mx.controls.DataGrid, "xxx", _root.getNextHighestDepth());
_root.mdtgrid.doLater(_root,"setData");
}

function setData(){ //insert data to datagrid
var temp:Array = new Array();
for (var i in _root.fxdata){
temp = new Object();
for (var j in _root.fxdata){
temp[j] = _root.fxdata[j];
}
}
_root.mdtgrid.dataProvider =temp;
_root.mdtgrid.doLater(_root,"setdgStyle");
}

function setdgStyle(){
var rowhight = 40;
var noofrow = 8;
var headerheight = 35;
var gridheight = (rowhight * noofrow) + headerheight ;
_root.mdtgrid.setSize(800, gridheight);
_root.mdtgrid.rowHeight =rowhight;
_root.setHeader(_root.header.split(","));
_root.setWidth(_root.wid.split(","));
_root.setAlign(_root.alig.split(","));
_root.mdtgrid.invalidate();
}

function setHeader(datasource:Array){ //set header label
var leng:Number = _root.mdtgrid.columnCount;
var sleng:Number = datasource.length;
var temp:Object;
for (i =0 ;i<leng;i++){
if (i>=sleng){
break;
}
_root.mdtgrid.getColumnAt(i).headerText = datasource;
}
}

function setWidth(datasource:Array){ //set columns width
var leng:Number = _root.mdtgrid.columnCount;
var sleng:Number = datasource.length;
var temp:Object;
for (i =0 ;i<leng;i++){
if (i>=sleng){
break;
}
_root.mdtgrid.getColumnAt(i).width = Number(datasource);
}
}
function setAlign(datasource:Array){ //set Alignment
var leng:Number = _root.mdtgrid.columnCount;
var sleng:Number = datasource.length;
var temp:Object;

for (i =0 ;i<leng;i++){
if (i>=sleng){
break;
}
temp = _root.mdtgrid.getColumnAt(i);
temp.setStyle("textAlign",trim(datasource));
}
}

Can Any One Have Link Where Datagrid Component
can any one have link where datagrid component, ACTUALLY I WANT HERE that i have rendered checkbox component in datagrid & delete multiple rows of datagrid help?

How To Clear Datagrid Component
here is the code , I thought removeAll() should do it but apparantly not







Attach Code

var item_obj:Object = {f1:'gary', f2:'28',f3:'male'};
myList.addItem(item_obj);

myList.removeAll()


var item_obj:Object = {sport:'surf', hobby:'chess'};
myList.addItem(item_obj);

Datagrid Component Headaches.....
I'm trying to attach a movie clip to a cell in the datagrid... I'm using .cellRenderer to do it but the movie clip is showing up in every row... in that column.... even the empty rows that contain no data.....any way to get it to show up only in rows that have data ?

Copyright © 2005-08 www.BigResource.com, All rights reserved