How to set column widths of datagrid/attribute table with typicalItem or explicitly

Discussion created by dboi517 on Jun 7, 2013
Latest reply on Jun 10, 2013 by dboi517

I have an application with an attribute table calling a feature service from ArcGIS Server 10.  I also have an Attribute Table skin which has removed the table options button as it was not necessary for our purposes.  The fields in the attribute table are being grabbed using an outFields property as follows:

Also, these outFields fields are the actual name, not the alias that displays on my attribute table.  So there are 9 fields that are displayed. The application itself is being embedded into a slightly small 600p x 590pixel window.  Currently, the AttributeTable width is set to 100%. The dataGrid in the skin also has a width of 100%

The most important thing for my application to do is have all the column widths be the appropriate size to fit the largest data item in that field. I understand this is done best practice by using the typicalItem property. However, I have no idea how to get it to work correctly.  If it means ditching the skin, I am okay with that--it is more important to get the column widths so that none of the headers display a "..." ellipse.  I am also ok with setting every column to the same width as long as it's long enough to fit the largest title, I believe that would be "NEIGHBORHOOD"

FYI Below is my code for the attribute table:
  <esri:AttributeTable id="myAttributeTable"
        width="100%" height="100%"

And this is my code for the dataGrid in my AttributeTableSkin:
   <s:DataGrid id="dataGrid"
      width="100%" height="100%"

To sum:  how do I set the column widths using the typicalItem property? Would it be done on the dataGrid in the skin? Or on the attribute table in my main application?

If the above is too hard/not possible, how can I explicitly set the widths of the columns?

If anyone can answer either of these questions it would be a huge help.  Thank you.