You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pi...@apache.org on 2020/03/13 14:16:06 UTC
[royale-asjs] branch develop updated: Add additional example to
depict DataGrid real use case
This is an automated email from the ASF dual-hosted git repository.
piotrz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new f47ce4d Add additional example to depict DataGrid real use case
f47ce4d is described below
commit f47ce4dfe8e9806f5c83e426ff16f713fd07568f
Author: Piotr Zarzycki <pi...@gmail.com>
AuthorDate: Fri Mar 13 15:15:50 2020 +0100
Add additional example to depict DataGrid real use case
---
.../src/main/royale/DataGridPlayGround.mxml | 27 +++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/examples/royale/TourDeJewel/src/main/royale/DataGridPlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/DataGridPlayGround.mxml
index 4608f65..7774fc3 100644
--- a/examples/royale/TourDeJewel/src/main/royale/DataGridPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/DataGridPlayGround.mxml
@@ -432,7 +432,32 @@ limitations under the License.
<j:Button text="Refresh Grid" click="refreshGrid(datagrid4, (listModel as ListsModel).iconListData)" emphasis="primary"/>
</j:Card>
</j:GridCell>
-
+ <j:GridCell desktopNumerator="1" desktopDenominator="2" tabletNumerator="1" tabletDenominator="2" phoneNumerator="1" phoneDenominator="1">
+ <j:Card>
+ <html:H3 text="Jewel DataGrid"/>
+
+ <j:Label text="width = 100%, no column widths, rowHeight=42 and emphasis='secondary', middle column has center alignment, last column has columnWidth=40. Clicking on row icon, remove the entire row."
+ multiline="true"/>
+
+ <j:DataGrid width="100%" height="240" emphasis="secondary" rowHeight="42"
+ change="dataGridIconListChange(event.target as DataGrid, datagrid3_lb)">
+ <j:beads>
+ <js:ConstantBinding
+ sourceID="listModel"
+ sourcePropertyName="iconDetailListData"
+ destinationPropertyName="dataProvider"/>
+ <j:RemoveDataGridItemRendererForArrayListData/>
+ </j:beads>
+ <j:columns>
+ <j:DataGridColumn label="Icon"
+ itemRenderer="itemRenderers.IconDataGridItemRenderer"/>
+ <j:DataGridColumn label="Label" dataField="label" align="center"/>
+ <j:DataGridColumn label="Is Jewel?" columnWidth="40"
+ itemRenderer="itemRenderers.CheckBoxDataGridItemRenderer"/>
+ </j:columns>
+ </j:DataGrid>
+ </j:Card>
+ </j:GridCell>
</j:Grid>
</c:ExampleAndSourceCodeTabbedSectionContent>