You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cf...@apache.org on 2012/12/21 20:47:44 UTC
svn commit: r1425113 - in
/incubator/flex/sdk/branches/develop/frameworks/projects/spark:
asdoc/en_US/spark/components/examples/DataGridLockedRowsAndColumnsExample.mxml
src/spark/components/DataGrid.as
Author: cframpton
Date: Fri Dec 21 19:47:44 2012
New Revision: 1425113
URL: http://svn.apache.org/viewvc?rev=1425113&view=rev
Log:
Add locked rows and columns example to ASdocs.
Added:
incubator/flex/sdk/branches/develop/frameworks/projects/spark/asdoc/en_US/spark/components/examples/DataGridLockedRowsAndColumnsExample.mxml (with props)
Modified:
incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/DataGrid.as
Added: incubator/flex/sdk/branches/develop/frameworks/projects/spark/asdoc/en_US/spark/components/examples/DataGridLockedRowsAndColumnsExample.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/spark/asdoc/en_US/spark/components/examples/DataGridLockedRowsAndColumnsExample.mxml?rev=1425113&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/spark/asdoc/en_US/spark/components/examples/DataGridLockedRowsAndColumnsExample.mxml (added)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/spark/asdoc/en_US/spark/components/examples/DataGridLockedRowsAndColumnsExample.mxml Fri Dec 21 19:47:44 2012
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+
+<!--
+A very simple DataGrid example that demonstrates the use of locked rows and columns.
+
+The ArrayCollection is the list of dataProvider items, one per DataGrid row and the DataGrid
+automatically creates one column for each property in the first item. The dataProvider
+property tag isn't specified because it's the default property and leaving it out makes the code
+just a little simpler looking. Although any class that implements IList can be used an a
+dataProvder, ArrayCollection is convenient because it enables the column sorting support.
+
+We've used the s:DataItem class to create data items for this example although in this case
+fx:Object would have worked equally well, because the example doesn't rely on data item
+property bindings. DataItem is used to define an untyped Object whose properties are bindable.
+
+-->
+
+<s:Application
+ xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark">
+
+ <s:Panel title="Spark DataGrid Control Example of using Locked Rows and Columns"
+ width="75%" height="75%" horizontalCenter="0" verticalCenter="0">
+ <s:controlBarContent>
+ <s:HGroup verticalAlign="baseline">
+ <s:Label text="lockedRowCount:"/>
+ <s:NumericStepper id="lockedRowNS" minimum="0" maximum="{dataGrid.dataProvider.length}"/>
+ <s:Label text="lockedColumnCount:"/>
+ <s:NumericStepper id="lockedColumnNS" minimum="0" maximum="{dataGrid.columns.length}"/>
+ </s:HGroup>
+ </s:controlBarContent>
+ <s:DataGrid id="dataGrid" verticalCenter="0" horizontalCenter="0" requestedRowCount="5"
+ lockedRowCount="{lockedRowNS.value}" lockedColumnCount="{lockedColumnNS.value}">
+ <s:ArrayCollection>
+ <s:DataItem key="1000" name="Abrasive" price="100.11" call="false"/>
+ <s:DataItem key="1001" name="Brush" price="110.01" call="true"/>
+ <s:DataItem key="1002" name="Clamp" price="120.02" call="false"/>
+ <s:DataItem key="1003" name="Drill" price="130.03" call="true"/>
+ <s:DataItem key="1004" name="Epoxy" price="140.04" call="false"/>
+ <s:DataItem key="1005" name="File" price="150.05" call="true"/>
+ <s:DataItem key="1006" name="Gouge" price="160.06" call="false"/>
+ <s:DataItem key="1007" name="Hook" price="170.07" call="true"/>
+ <s:DataItem key="1008" name="Ink" price="180.08" call="false"/>
+ <s:DataItem key="1009" name="Jack" price="190.09" call="true"/>
+ </s:ArrayCollection>
+ </s:DataGrid>
+ </s:Panel>
+</s:Application>
Propchange: incubator/flex/sdk/branches/develop/frameworks/projects/spark/asdoc/en_US/spark/components/examples/DataGridLockedRowsAndColumnsExample.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/flex/sdk/branches/develop/frameworks/projects/spark/asdoc/en_US/spark/components/examples/DataGridLockedRowsAndColumnsExample.mxml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/DataGrid.as
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/DataGrid.as?rev=1425113&r1=1425112&r2=1425113&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/DataGrid.as (original)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/DataGrid.as Fri Dec 21 19:47:44 2012
@@ -753,6 +753,7 @@ include "../styles/metadata/BasicInherit
* @includeExample examples/DataGridRowHeightExample.mxml
* @includeExample examples/DataGridSelectionExample.mxml
* @includeExample examples/DataGridInvalidateCellExample.mxml
+ * @includeExample examples/DataGridLockedRowsAndColumnsExample.mxml
*
* @langversion 3.0
* @playerversion Flash 10