Avoiding the resizing of columns in flex DataGrid Control.

The columns in DataGrid control are re-sizable by  default i.e the user can put his mouse on the column and it will show the sizing icon and can move the column by press-hold the mouse.In brief sizing the column to our need for a better view.

So here by default it is set “true”  and the property that is set is resizableColumns.And to avoid this just set it to “false”.

code Example:

<mx:DataGrid x=”98″ y=”212″ id=”dgcolor”  resizableColumns=”false”>
<mx:columns>
<mx:DataGridColumn headerText=”Column 1″ />
<mx:DataGridColumn headerText=”Column 2″ />
</mx:columns>
</mx:DataGrid>

Thats it the change is visible ..

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: