Copy link to clipboard
Copied
I am trying to get the textfiled of the datagrid to be big enough to fit long names, i have tried lots of different things, from applying a cellrenderer and making the textfiled wider which worked in away because you can see all the text. and the column itself has a minwidth. But the box behind does not change. How do i get access to it to make it wider?
Thanks
Copy link to clipboard
Copied
what's the problem when you increase the width of your dg?
Copy link to clipboard
Copied
it does not increase the size of the column, just adding a big yellow space at the side, i want the white boxes, what i assumed to be the column to be the width i tell it, but it does not change. the grid is 500 wide and the name col has a min width of 400, with a cell rendered class telling it the textfield should be 400 wide too.
Copy link to clipboard
Copied
did you adjust your datagridcolumn width?
Copy link to clipboard
Copied
several times, eventually setting it to have a minimum width of 400, but it made no difference to the appearnce
Copy link to clipboard
Copied
you would use something like:
var dgc:DataGridColumn = yourdg.getColumnAt(0);
dgc.width = 400;
i see you've worked out a solution so you may not be interested. but, for others, that's how it should be done.
Copy link to clipboard
Copied
i am creating the columns dynamically so i thought that would be enought like
var titleCol:DataGridColumn = new DataGridColumn();
titleCol.width = 400;
myDataGrid.addColumn(titleCol);
Copy link to clipboard
Copied
that won't work and should generate error messages. the datagridcolumn constructor requires a string is passed or a dataField property is assigned to the column before assigning the column to the datagrid.
Copy link to clipboard
Copied
i have found away around or perhaps the only way, by using skins to recreate the white box, seems to work fine juts need to sort the layering