Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / docs / source / Property.html
diff --git a/docs/source/Property.html b/docs/source/Property.html
new file mode 100644 (file)
index 0000000..c14bd64
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-grid.property.Property-method-constructor'><span id='Ext-grid.property.Property'>/**
+</span></span> * @class Ext.grid.property.Property
+ * A specific {@link Ext.data.Model} type that represents a name/value pair and is made to work with the
+ * {@link Ext.grid.property.Grid}.  Typically, Properties do not need to be created directly as they can be
+ * created implicitly by simply using the appropriate data configs either via the {@link Ext.grid.property.Grid#source}
+ * config property or by calling {@link Ext.grid.property.Grid#setSource}.  However, if the need arises, these records
+ * can also be created explicitly as shown below.  Example usage:
+ * &lt;pre&gt;&lt;code&gt;
+var rec = new Ext.grid.property.Property({
+    name: 'birthday',
+    value: Ext.Date.parse('17/06/1962', 'd/m/Y')
+});
+// Add record to an already populated grid
+grid.store.addSorted(rec);
+&lt;/code&gt;&lt;/pre&gt;
+ * @constructor
+ * @param {Object} config A data object in the format:&lt;pre&gt;&lt;code&gt;
+{
+    name: [name],
+    value: [value]
+}&lt;/code&gt;&lt;/pre&gt;
+ * The specified value's type
+ * will be read automatically by the grid to determine the type of editor to use when displaying it.
+ */
+Ext.define('Ext.grid.property.Property', {
+    extend: 'Ext.data.Model',
+
+    alternateClassName: 'Ext.PropGridProperty',
+
+    fields: [{
+        name: 'name',
+        type: 'string'
+    }, {
+        name: 'value'
+    }],
+    idProperty: 'name'
+});</pre></pre></body></html>
\ No newline at end of file