Adobe告訴我們不要在移動設備上使用Datagrid。我正在創建一個具有更多屏幕空間的Blackberry Playbook應用程序,以潛在地顯示數據表。所以出現了一些問題!Flex移動設備上的數據格
如果我不應該使用DataGrid,我應該使用什麼? (列表不計算,因爲在我的應用程序中,我有10個表格,每個列表的列數和列寬都不同)
好的,如果我必須使用Datagrid,如何設置它的大小以顯示正好所有的數據?例如,一些表具有不同的長度的行,所以requestedRowCount = ' - 1'似乎不正常工作(例如參見下文)
守則
<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>`
結果(注意高度不適合3排,它增加了底部的空間)!