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/04/10 13:42:43 UTC
[royale-asjs] branch develop updated: tour-de-jewel: Add DataGrid
example which shows issue with rowHeight when data of cells are big
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 cf2b1c4 tour-de-jewel: Add DataGrid example which shows issue with rowHeight when data of cells are big
new 9f5b79e Merge branch 'develop' of https://github.com/apache/royale-asjs into develop
cf2b1c4 is described below
commit cf2b1c49102d52c48d734edb3e2489e64f4c9816
Author: Piotr Zarzycki <pi...@gmail.com>
AuthorDate: Fri Apr 10 15:41:21 2020 +0200
tour-de-jewel: Add DataGrid example which shows issue with rowHeight when data of cells are big
---
.../src/main/royale/DataGridPlayGround.mxml | 24 ++++++++++++++++++++--
.../src/main/royale/models/ListsModel.as | 16 +++++++++++++++
2 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/examples/jewel/TourDeJewel/src/main/royale/DataGridPlayGround.mxml b/examples/jewel/TourDeJewel/src/main/royale/DataGridPlayGround.mxml
index ea14359..7722f75 100644
--- a/examples/jewel/TourDeJewel/src/main/royale/DataGridPlayGround.mxml
+++ b/examples/jewel/TourDeJewel/src/main/royale/DataGridPlayGround.mxml
@@ -22,8 +22,7 @@ limitations under the License.
xmlns:html="library://ns.apache.org/royale/html"
xmlns:js="library://ns.apache.org/royale/basic"
xmlns:models="models.*"
- xmlns:c="components.*" sourceCodeUrl="DataGridPlayGround.mxml"
- >
+ xmlns:c="components.*" sourceCodeUrl="DataGridPlayGround.mxml">
<!-- initComplete="onDataGridPlayGroundInitComplete(event)" -->
<fx:Script>
@@ -456,7 +455,28 @@ limitations under the License.
</j:CardActions>
</j:Card>
</j:GridCell>
+
+ <j:GridCell desktopNumerator="1" desktopDenominator="2" tabletNumerator="1" tabletDenominator="2" phoneNumerator="1" phoneDenominator="1">
+ <j:Card>
+ <j:CardHeader>
+ <html:H3 text="No rowHeight" className="primary-normal"/>
+ </j:CardHeader>
+ <j:CardPrimaryContent>
+
+ <j:Label text="Row height is not setupe and there are different amount of data in cells"
+ multiline="true"/>
+ <j:DataGrid id="biggerData" width="350" emphasis="emphasized"
+ dataProvider="{listModel.dgBiggerRowData}">
+ <j:columns>
+ <j:DataGridColumn label="Name" dataField="name" columnWidth="90" />
+ <j:DataGridColumn label="Description" dataField="description" columnWidth="200"/>
+ </j:columns>
+ </j:DataGrid>
+ </j:CardPrimaryContent>
+ </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"/>
diff --git a/examples/jewel/TourDeJewel/src/main/royale/models/ListsModel.as b/examples/jewel/TourDeJewel/src/main/royale/models/ListsModel.as
index 63ad1b8..2964b3c 100644
--- a/examples/jewel/TourDeJewel/src/main/royale/models/ListsModel.as
+++ b/examples/jewel/TourDeJewel/src/main/royale/models/ListsModel.as
@@ -219,5 +219,21 @@ package models
{
_bigIconListVOData = null;
}
+
+ private var _dgBiggerRowData:ArrayList = new ArrayList([
+ {name: "Piotr", description: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. "
+ + "Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."},
+ {name: "Alice", description: "Lorem Ipsum is simply dummy text of the printing and typesetting industry."}
+ ]);
+
+ public function get dgBiggerRowData():ArrayList
+ {
+ return _dgBiggerRowData;
+ }
+
+ public function set dgBiggerRowData(value:ArrayList):void
+ {
+ _dgBiggerRowData = value;
+ }
}
}