Tutorial :wordWrap=“true” does not work in Flex Datagrid


in Flex Datagrid, I need to support line wrap function in one column. In theory I need to set wordWrap="true" and variableRowHeight="true". It works well.

But the problem is that if in the cloumn I set itemRenderer="lc.monitoring.logviewer.components.CustomColumnRenderer" properties, then the line wrap funciton does not take effect. It seems that the line wrap function can not work with itemRenderer in the datagrid column.

Any one can help me about this.


Don't use Label - it is for displaying a single line of text.

The Label control displays a single line of noneditable text. Use the Text control to create blocks of multiline noneditable text.

mx.controls.Text supports multiline text and wordwrap

If the control is not as wide as the text, the text will wordwrap. The text is always aligned top-left in the control.


You should try to override measure and updateDisplaylist inside your itemrenderer. Your item renderer does not know how to resize the height in order to allow showing info inside the dg

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »