Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-11-2009, 12:16 PM   #1
sipra
Registered User
 
Join Date: Feb 2009
Posts: 15
Default All the datagrid column are not resizing proportionalily when resize the browser

Hi,

I have a datagrid with some columns and most of the columns have header renderer.Now when I resize the browser all the datagrid columns are not resizing proportionaly.The last column effected only.Is there any cause for the header renderer in the datagrid column?
If any solution have then please suggest.Thanks in advance.
sipra is offline   Reply With Quote
Old 02-11-2009, 12:54 PM   #2
wvxvw
Holosuit User
 
wvxvw's Avatar
 
Join Date: Oct 2006
Location: Tel Aviv
Posts: 4,301
Send a message via ICQ to wvxvw
Default

If you don't set the width of the colomn it'll be calculated based on the length of the header for that column. So, probably, you'll need to listen to the resize event, and reset the columns width depending on the entire application width:
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
	xmlns:mx="http://www.adobe.com/2006/mxml"
	paddingLeft="0"
	paddingRight="0">
	<mx:DataGrid width="100%">
		<mx:dataProvider>
			<mx:XMLList>
				<node column1="Foo" column2="Bar"/>
				<node column1="Foo" column2="Bar"/>
				<node column1="Foo" column2="Bar"/>
				<node column1="Foo" column2="Bar"/>
				<node column1="Foo" column2="Bar"/>
			</mx:XMLList>
		</mx:dataProvider>
		<mx:columns>
			<mx:DataGridColumn 
				width="{width / 2}" 
				dataField="@column1" 
				headerText="Column 1"/>
			<mx:DataGridColumn 
				width="{width / 2}" 
				dataField="@column2" 
				headerText="Column 2"/>
		</mx:columns>
	</mx:DataGrid>
</mx:Application>
__________________
The .NET open source editor for Flash and web developers
*This would be my contribution to the project*
couchsurfing if you need it
wvxvw is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing that datagrid column in flex 2 ghostofcain Flex 2, 3 & 4 4 06-12-2008 07:52 AM
remove datagrid column marlenesvitorino Flex 2, 3 & 4 0 03-08-2008 01:23 PM
Adding column to the datagrid dynamically bmorrise Flex 2, 3 & 4 4 11-08-2007 08:01 AM
Determining DataGrid Column of selected cell nprzybylo Flex 2, 3 & 4 0 02-21-2007 04:53 PM
Datagrid Column Titles simulate Components 2 04-09-2004 09:39 AM


All times are GMT. The time now is 10:32 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.