Adobe tells us to not use Datagrid on mobile devices. I'm creating a Blackberry Playbook application that has more screen space to potentially display a table of data. So a few questions arise!
If I shouldn't use DataGrid, what should I use? (List doesn't count because in my application I have 10's of tables each with different numbers of columns and column widths)
Ok, if I have to use a Datagrid, how can I set the size of it to show exactly all the data? For example, some tables have rows of different lengths, so requestedRowCount='-1' doesn't seem to work (See example below)
The Code
<s:DataGrid requestedRowCount="-1" requestedColumnCount="-1" variableRowHeight="true" styleName="dataGrid" id="partiesGrid" dataProvider="{arr1}" skinClass="skins.DataGridSkin" click="navigator.pushView(view.AssessmentInvolvementEditView)">
<s:columns>
<s:ArrayList>
<s:GridColumn dataField="name" headerText="Name" width="150"/>
<s:GridColumn dataField="role" headerText="Role" width="150"/>
<s:GridColumn dataField="startdate" headerText="Start" width="100"/>
<s:GridColumn dataField="enddate" headerText="End" width="100"/>
<s:GridColumn dataField="presponsibility" headerText="Response" width="150"/>
<s:GridColumn dataField="pcarer" headerText="Carer" width="110"/>
<s:GridColumn dataField="kworker" headerText="Worker" width="110"/>
<s:GridColumn dataField="kteam" headerText="Team" width="110"/>
</s:ArrayList>
</s:columns>
</s:DataGrid>`
The Result (Notice how the height doesnt fit the 3 rows, it adds space at the bottom)!