Welcome, Guest. Please login or register.
Did you miss your activation email?
05/21/12, 03:41
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  V2 Components (Flash MX 2004 - Flash 8) (Moderators: vesa kortelainen, Ronald Wernecke, Jorge Solis, ..:: Mazhar Hasan ::.., papachan)
| | |-+  DatGrid columns not setting widths correctly
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: DatGrid columns not setting widths correctly  (Read 958 times)
hobbis
Jr. Programmer
**
Posts: 75


View Profile Email
« on: 06/30/05, 09:51 »

Am I doing something wrong here? When it loads for the first time, the columns set their own widths. When I reload the data and re-run the function, the widths get set correctly. Function code below:

Code:
myDataGrid.resizableColumns = false;
myDataGrid.dataProvider = RecordSet(re.result);
myDataGrid.removeAllColumns();
myDataGrid.editable = true;
myDataGrid.headerHeight = 18;
myDataGrid.hScrollPolicy = "no";
myDataGrid.rowHeight = 18;

var col0 = new DataGridColumn("time");
col0.headerText = "Time";
col0.width = 50;
myDataGrid.addColumnAt(0, col0);

var col1 = new DataGridColumn("duration");
col1.headerText = "Duration";
col1.width = 50;
myDataGrid.addColumnAt(1, col1);

var col2 = new DataGridColumn("text");
col2.headerText = "Subtitle Text";
col2.width = 400;
myDataGrid.addColumnAt(2, col2);

var col3 = new DataGridColumn("delete");
col3.headerText = "Delete";
col3.width = 30;
col3.editable = false;
col3.cellRenderer = "IconCellRenderer";
myDataGrid.addColumnAt(3, col3);
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #1 on: 06/30/05, 13:09 »

Probably your data arrives before you set the Columns?
The cellrenderer shows correctly the first time?

Jorge
Logged

Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything