Switch to Code view (View > Code) and set column properties of the DataGrid by locating the
9.
two
<mx:DataGridColumn>
<mx:DataGridColumn headerText="Name" columnName="name" width="300"/>
<mx:DataGridColumn headerText="Price" columnName="price" textAlign="right"
marginRight="4" />
You can use Code hints to quickly set these properties. For example, to set the
click in the tag before the closing angle bracket, press the Spacebar to display the code hints,
type the letter w to quickly select the property, and press Enter. Type 300 to set the value.
Save the component file in the fbComponents folder by selecting File > Save, double-clicking
10.
the fbComponents folder, and naming the component file as follows:
GridView.mxml
In Design View, the completed component should look similar to the following figure if you
select the VBox container:
Note: The component will scale to fit in the space allotted to it in the flexstore.mxml file.
tags, and adding the following properties (shown in bold type):
Tutorial: Building custom components with Flex Builder
property,
width
37
Need help?
Do you have a question about the FLEX BUILDER-USING FLEX BUILDER and is the answer not in the manual?