Datagrid and variable height

I am trying to dynamically adjust the height of each row depending on the amount of text there is. Is this something only AS3 or Flex can do? Or am I missing something?
function dataGridFunction() {
 
	var characters:Array = new Array(new Array("01", "Jerry Jerry Jerry Jerry Jerry", "Seinfeld Seinfeld Seinfeld Seinfeld Seinfeld Seinfeld Seinfeld Seinfeld Seinfeld Seinfeld"), new Array("02", "Elaine", "Benes"), new Array("03", "Cosmo", "Kramer"), new Array("04", "Jocopo", "Peterman"), new Array("05", "Lloyd", "Braun"), new Array("06", "Estelle", "Costanza"), new Array("06", "George", "Costanza"), new Array("08", "Frank", "Costanza"), new Array("09", "David", "Puddy"), new Array("10", "Mickey", "Abbott"), new Array("11", "Morty", "Seinfeld"), new Array("12", "Helen", "Seinfeld"));
	//
	for (var i:Number = 0; i<characters.length; i++) {
		var id:String = characters[i][0];// I added this field
		var firstName:String = characters[i][1];
		var lastName:String = characters[i][2];
		dataGridMain.addItem({ID:id, First:firstName, Last:lastName});
	}
	//
		dataGridMain.variableRowHeight = true;
	dataGridMain.wordWrap = true;
	//
	dataGridMain.setStyle("fontFamily","Verdana");
	dataGridMain.setStyle("headerColor","0xA6CBDD");
	dataGridMain.setStyle("alternatingRowColors",["0xF0F0F0", "0xFFFFFF"]);
	dataGridMain.setStyle("rollOverColor","0xDCEBF1");
	dataGridMain.setStyle("selectionColor","0x5ec40b");// was 0xFFF97D
	dataGridMain.setStyle("selectionDuration",300);
	//
 
 
}
dataGridFunction();

Open in new window

msukowAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

blue-genieCommented:
i think what you're looking for is the CellRenderer.
have a look in the help file - there's explanations on how it works and some samples on how to create multiline cells so i think that should resize according to the content.
haven't tried it myself but its worth a shot.
0
blue-genieCommented:
oh wait, i just read this in the help file.
as you know the DataGrid extends the list

" The following are some fundamental assumptions and requirements that Adobe used when developing the List class:


Lists have uniform row heights.
Every row must be the same height; the height can be set during authoring or at runtime.

Lists must scale to thousands of records.
Lists don't measure text.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.