IT Community - Software Programming, Web Development and Technical Support

Using cell Renderer with Datagrid in flash

This is a discussion on Using cell Renderer with Datagrid in flash within the Flash Actionscript Programming forums, part of the Web Development category; Using cell Renderer with Datagrid in flash: Cell Renderer API: components inside a Datagrid Goals This example shows how you ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Flash Actionscript Programming

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 07-15-2007, 10:28 PM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 631
oxygen is on a distinguished road
Default Using cell Renderer with Datagrid in flash

Using cell Renderer with Datagrid in flash:

Cell Renderer API: components inside a Datagrid


Goals

This example shows how you can use components or MovieClip inside the the datagrid (ie into datagrid cells).

In this example a custom Exit Button icon is used inside the datagrid component. When we click the Button that row will be deleted. Let us now create a actionscript class file to attach the button into the Datagrid cell. Name it as exitButton.as


You can get this "exitButton.as" attched with this post.


Create and Flash Document:

1) First Open a Flash Document.
2) Drag an instance of the Datagrid in to the stage, name it as gridBox. 3) Create an exit button icon as you wish, its size should be fit into the Datagrid cell. Name it as 'exbtn" and set its linkage identifier as "exbtn".
4) Then create a movieclip but nothing should be draw inside the clip and name it as "gridCellRenderer", it is the mediater to connect AS class file and the Flash document .
5) Right Clik the gridCellRenderer" movieclip and select linkage, its shows the linkage properties box. 6) Click the Export for ActionScript CheckBox, Set the linkage identifier to "exitButton" and AS 2.0 Class to "exitButton" (this should be same as the class file we created).
7) we must save the Flash Document and the ActionScript class file in the same path, then only it will take effect.
8) Write the codes in Main TimeLine.

gridBox.setSize(150,100);
gridBox.setStyle("borderStyle","solid");
gridBox.rowHeight = 20;
gridBox.setStyle("alternatingRowColors",[0xD8F9FC,0xeeeee6]);
gridBox.setStyle("fontSize", 11);
gridBox.setStyle("hGridLines", true);
gridBox.setStyle("hGridLineColor", 0xCCCCCC);
gridBox.setStyle("vGridLines", false);
gridBox.setStyle("fontFamily", "Verdana");
gridBox.setStyle("useRollOver", true);

gridBox.addColumn("name");
gridBox.addColumn("exit");
gridBox.getColumnAt(0).width =110;
gridBox.getColumnAt(1).width =20
gridBox.showHeaders=false;

var myDP_array:Array = new Array({name:"John"},{name:"Jose"},{name:"James"},{ name:"Jonathan"});
gridBox.dataProvider = myDP_array;
gridBox.getColumnAt(1).cellRenderer = "exitButton";


Thats All.

Note : Also i have attched a sample swf file for the demo purpose. if you want further details contact me.
Attached Files
File Type: zip exitButton.zip (62.4 KB, 413 views)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 01-05-2009, 02:24 PM
ryan_hickman ryan_hickman is offline
D-Web Trainee
 
Join Date: Jan 2009
Posts: 1
ryan_hickman is on a distinguished road
Default Re: Using cell Renderer with Datagrid in flash

so its empty... great!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 01-05-2009, 04:46 PM
coder4hire coder4hire is offline
D-Web Trainee
 
Join Date: Jan 2009
Posts: 1
coder4hire is on a distinguished road
Default Re: Using cell Renderer with Datagrid in flash

dude, your zip is empty
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 04-06-2009, 09:15 PM
kumaravel kumaravel is offline
D-Web Trainee
 
Join Date: Apr 2009
Posts: 1
kumaravel is on a distinguished road
Thumbs down Re: Using cell Renderer with Datagrid in flash

Its Empty............................
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 07-11-2010, 03:44 PM
before802 before802 is offline
D-Web Incredible
 
Join Date: May 2010
Posts: 1,594
before802 is on a distinguished road
Talking Goods2010-07-05-one-216

panage78pan252deicpaaosmrotahamberg0909ethanjl
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 07-17-2010, 07:37 AM
levis794 levis794 is offline
D-Web Genius
 
Join Date: May 2010
Posts: 815
levis794 is on a distinguished road
Question Goods2010-07-05-one-232

qyaboabigailev16lgfzpuutkunceljb3lambulaship18
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 07-18-2010, 06:48 PM
before802 before802 is offline
D-Web Incredible
 
Join Date: May 2010
Posts: 1,594
before802 is on a distinguished road
Lightbulb Goods2010-07-05-one-210

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


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
datagrid cell value nssukumar Flash Actionscript Programming 4 07-11-2007 08:03 AM
Difference of cell spacing and cell padding? vigneshgets HTML, CSS and Javascript Coding Techniques 1 05-30-2007 10:57 AM
Video Renderer tripnautic Game Development 0 03-20-2007 07:03 PM
changing cell color in datagrid nssukumar Flash Actionscript Programming 0 03-16-2007 12:32 AM


All times are GMT -7. The time now is 12:27 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
Stamford Dentist | Euro Millions Lottery | Tech Support Services

SEO by vBSEO 3.0.0