Adobe Dreamweaver Forums



Last 10 THreads :         Making constraints on a symbol... (Last Post : sirkibble2 - Replies : 0 - Views : 1 )           »          Creating a boundry in the stage... (Last Post : fazstp - Replies : 2 - Views : 3 )           »          Director or Flash? (Last Post : Sean Wilson - Replies : 1 - Views : 2 )           »          DW8 Activation not working (Last Post : moonliner - Replies : 0 - Views : 1 )           »          Re: Mouse capture won't activate (Last Post : robertnagle - Replies : 0 - Views : 1 )           »          help! my FB3 has gone insane! (Last Post : peteandrus - Replies : 0 - Views : 1 )           »          help! my FB3 has gone insane! (Last Post : peteandrus - Replies : 0 - Views : 1 )           »          How come the html is being displayed, and not the link (Last Post : Skaterstu - Replies : 0 - Views : 1 )           »          Another way to accomplish this (Last Post : Andy-K - Replies : 2 - Views : 3 )           »          HELP! Cannot upload files in DW CS4 (Last Post : dan@hoppernet.org - Replies : 6 - Views : 7 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 10-09-2008, 06:02 PM
ericbelair
 
Posts: n/a
Diggs:
Default DataGridColumn width not working...

I'm trying everything to get my DataGrid to display how I want it - with an
explicit width - but it's not cooperating. It seems to set it's own width.

The only workaround I've found is to add a Container above the DataGrid with a
Label inside of it (????):

<mx:Box width="100%">
<mx:Label text="" />
</mx:Box>

Why this works, I have no idea....

Please help...

private function dataGrid_creationCompleteHandler():void
{
Alert.show(styleColumn.width.toString()); // "107.2"

styleColumn.width = 400;

dataGrid.validateNow();

Alert.show(styleColumn.width.toString()); // "107.2"
}



<mxataGrid id="dataGrid" width="100%" height="100%"
dataProvider="{myAC}" editable="true"
verticalScrollPolicy="on" verticalAlign="middle"
allowMultipleSelection="true"
draggableColumns="false" sortableColumns="false"
resizableColumns="false"
showDataTips="true" dataTipFunction="dataGrid_dataTipFunction"
creationComplete="dataGrid_creationCompleteHandler ();">
<mx:columns>
<mxataGridColumn id="nameColumn" headerText="Name"
dataField="name" editable="false" />

<mxataGridColumn id="styleColumn"
dataField="customStyle" labelFunction="styleLabel"
headerText="Style" editable="true"
itemEditor="CustomStyleItemEditor"
editorDataField="customStyle" editorXOffset="5"
editorWidthOffset="-5" />
</mx:columns>
</mxataGrid>



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-09-2008, 07:30 PM
mhartnett
 
Posts: n/a
Diggs:
Default Re: DataGridColumn width not working...

Eric,

Change your
creationComplete="dataGrid_creationCompleteHandler (); to
initialize="dataGrid_creationCompleteHandler(); or whatever you want to call
the method.

At the point of creationComplete your datagrid has already drawn itself.
During the initialize the properties are set for each column to use before it
draws itself.

I have never manipulated grid columns widths programatically after it has
drawn itself so I am not sure how to do this. (I would think it would be
possible). You could also define the width within each datagridcolumn.


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 02:32 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk