[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Format specific cells or specific rows of a datagrid component.

Posted on 2008-06-25
4
Medium Priority
?
537 Views
Last Modified: 2013-11-11
Seems simple, but I can't figure this out.

Is there any way in AS2 to format a specific cell of a datagrid component? So, let's say I want to make cell 2,4 bold with green text?

If this isn't possibble, or difficult, I could settle with formatting a specific row as such? For example, set row 3 to be bold with green text.
0
Comment
Question by:crickeys
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 375 total points
ID: 21868070
Indeed it is possible using CellRenderer Class.

Using CellRenderer class, we can apply complete HTML formatting (supported by flash for any textField) to any cell of DataGrid

here is an example with source files:
http://philflash.inway.fr/htmlrdtip1/htmlrdtip1.zip

you can see the possibilities here
0
 

Author Comment

by:crickeys
ID: 21868441
That looks interesting but if I use the following code, the myHtmlFunction never gets fired?
myHtmlFunction = function (itemObj:Object, columnName:String) {
 
	trace("fired");
	
}
 
// --- DataGrid columns ---
userList_lb.columnNames = ["name"];
 
var col:mx.controls.gridclasses.DataGridColumn;
var totalWidth:Number = 0;	
 
col = userList_lb.getColumnAt(0);
 
col.headerText = "Image 1";
col.cellRenderer = "HtmlCellRenderer";
col["htmlFunction"] = myHtmlFunction;

Open in new window

0
 
LVL 34

Assisted Solution

by:Aneesh Chopra
Aneesh Chopra earned 375 total points
ID: 21871583
Have you copied "HtmlCellRenderer" into your library or not..?
0
 

Author Comment

by:crickeys
ID: 21871590
That was it, thanks.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create blended and gradiated shapes in Illustrator using the blend tool Draw two shapes, one of them in a different color: Select both and create a blend by going to Object > Blend > Make: Blends can also b…
How to make a clipping mask out of several separate vector objects by using the Compound Path option in Adobe Illustrator.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question