Flex <mx:DataGrid>在一个记录中支持换行显示
发布时间:2020-12-15 04:25:42 所属栏目:百科 来源:网络整理
导读:这个问题把我折磨的苦不堪言。因为从网上所搜的大多都是采用复杂的正则替换什么的。 首先,需要给mx:DataGrid的variableRowHeight设置为true. mx:DataGrid x="10" y="349" width="100%" height="180" id="replyGrid" allowMultipleSelection="true" variable
这个问题把我折磨的苦不堪言。因为从网上所搜的大多都是采用复杂的正则替换什么的。 首先,需要给mx:DataGrid的variableRowHeight设置为true. <mx:DataGrid x="10" y="349" width="100%" height="180" id="replyGrid" allowMultipleSelection="true" variableRowHeight="true"> variableRowHeight:一个标志,指示各行是否可以采用不同的高度。TileList 和 HorizontalList 将忽略此属性。如果设置为 true ,则各行可以具有不同的高度值。
然后再在有可能需要多行显示的列上将mx:DataGridColumn的wordWrap属性设置为true. <mx:DataGridColumn dataField="memo" headerText="详细内容" width="900" wordWrap="true"/> mx.controls.dataGridClasses.DataGridColumn.wordWrap(value:*):void:?一个标志,指示当此列中各行的文本不能在一行中显示时,是否能够自动换行。如果为 undefined ,则使用 DataGrid 控件的
wordWrap 属性。
仅当 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |