Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I had the same problem with the first row width being messed up and after many hours of digging around finally stumbled across the answer to fix the first row width on a few blogs.</p> <p>You basically have to set a 'typicalItem' on the datagrid or else the Spark Datagrid will automatically use the first row to determine the widths:</p> <blockquote> <p>The DataGrid's typicalItem is used to compute the initial width of each GridColumn that doesn't specify an explicit width.</p> <p>Here's an example of a DataGrid that specifies a typicalItem.</p> </blockquote> <pre><code>&lt;s:DataGrid id="dataGrid" requestedRowCount="5" verticalCenter="0" horizontalCenter="0"&gt; &lt;s:typicalItem&gt; &lt;s:DataItem key="99999" name="Typical Item" price="123.45" call="false"/&gt; &lt;/s:typicalItem&gt; &lt;s:ArrayCollection id="items"&gt; &lt;s:DataItem key="1000" name="Abrasive" price="100.11" call="false"/&gt; &lt;s:DataItem key="1001" name="Brush" price="110.01" call="true"/&gt; ... &lt;/s:ArrayCollection&gt; &lt;/s:DataGrid&gt; </code></pre> <p>For more info, check out these links:</p> <ul> <li><a href="http://hansmuller-flex.blogspot.com/2011/05/using-datagrid-typicalitem-to-define.html" rel="nofollow">http://hansmuller-flex.blogspot.com/2011/05/using-datagrid-typicalitem-to-define.html</a></li> <li><a href="http://butterfliesandbugs.wordpress.com/2011/03/08/its-a-best-practice-to-size-a-spark-datagrids-columns-with-a-typicalitem/" rel="nofollow">http://butterfliesandbugs.wordpress.com/2011/03/08/its-a-best-practice-to-size-a-spark-datagrids-columns-with-a-typicalitem/</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload