• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

datagrid sizing

Community Beginner ,
Apr 13, 2010 Apr 13, 2010

Copy link to clipboard

Copied

datagrid.png

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

TOPICS
ActionScript

Views

839

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2010 Apr 13, 2010

Copy link to clipboard

Copied

what's the problem when you increase the width of your dg?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 13, 2010 Apr 13, 2010

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2010 Apr 13, 2010

Copy link to clipboard

Copied

did you adjust your datagridcolumn width?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 13, 2010 Apr 13, 2010

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2010 Apr 13, 2010

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 13, 2010 Apr 13, 2010

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);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2010 Apr 13, 2010

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 13, 2010 Apr 13, 2010

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines