fixed row width in DataGrid quirk

戏子无情 提交于 2019-12-25 00:29:42

问题


I've got this issue: I've got a dataGrid where whenever I set the column to not be resizable, the width gets messed up;

works:

var myCol:DataGridColumn = new DataGridColumn("Title");
myCol.width = 180;

doesn't work (width is about 40pixels):

var myCol:DataGridColumn = new DataGridColumn("Title");
myCol.width = 180;
myCol.resizable = false;

has anyone come across this or know why this is happening?

I'm ready to just create my own dataGrid class now...


回答1:


One thing that has helped us in the past : Before you set any width on a datagrid column, set the horizontalScrollPolicy to "on". You can set it back to "off" or "auto" after you set the width.

See this: Flex 3 DataGrid Column Width Problem



来源:https://stackoverflow.com/questions/6084593/fixed-row-width-in-datagrid-quirk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!