You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2020/11/15 10:21:34 UTC

[royale-asjs] branch develop updated: tourdejewel: add VirtualDataGrid example still WIP

This is an automated email from the ASF dual-hosted git repository.

carlosrovira 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 7e07e8e  tourdejewel: add VirtualDataGrid example still WIP
7e07e8e is described below

commit 7e07e8ec48eb51fe136d301af327137bccc73e92
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sun Nov 15 11:21:24 2020 +0100

    tourdejewel: add VirtualDataGrid example still WIP
---
 .../src/main/royale/VirtualListsPlayGround.mxml       | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/examples/jewel/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml b/examples/jewel/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
index 68be394..05a3bc2 100644
--- a/examples/jewel/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
+++ b/examples/jewel/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
@@ -27,11 +27,16 @@ limitations under the License.
 	
 	<fx:Script>
 		<![CDATA[
+		import models.ProductModel;
+
 		import org.apache.royale.collections.ArrayList;
 		import org.apache.royale.core.StyledUIBase;
 
 		import vos.IconListVO;
 
+		[Bindable]
+		public var productModel:ProductModel = new ProductModel();
+
 		private function addItemToVirtual():void
 		{
 			var iconListVO:IconListVO = new IconListVO("New Item", MaterialIconType.CLOSE);
@@ -159,6 +164,20 @@ limitations under the License.
 				</j:VirtualComboBox>			
 			</j:Card>
         </j:GridCell>
+		
+		<j:GridCell desktopNumerator="1" desktopDenominator="1" tabletNumerator="1" tabletDenominator="1" phoneNumerator="1" phoneDenominator="1">
+            <j:Card>
+				<html:H3 text="Jewel VirtualDataGrid"/>
+				
+				<j:VirtualDataGrid localId="virtualDataGrid"
+							dataProvider="{productModel.productList}">
+					<j:columns>
+						<j:DataGridColumn label="Title" dataField="title"/>
+						<j:DataGridColumn label="Sales" dataField="sales"/>
+					</j:columns>
+				</j:VirtualDataGrid>			
+			</j:Card>
+        </j:GridCell>
 	</j:Grid>
 	
 </c:ExampleAndSourceCodeTabbedSectionContent>