added YUI and YUI-ext
fixed the resizable text area with IE problem fixed the ad space with IE problem merged the 7.2.0 and 7.1.4 change logs
This commit is contained in:
parent
6bf329d68d
commit
4f68a0933c
1026 changed files with 331404 additions and 60 deletions
838
www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultDataModel.html
Normal file
838
www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultDataModel.html
Normal file
|
|
@ -0,0 +1,838 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
YAHOO.ext.grid.DefaultDataModel
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="YAHOO.ext.grid.DefaultDataModel";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();" style="margin:15px;">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class YAHOO.ext.grid.DefaultDataModel</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<a href='YAHOO.ext.grid.AbstractDataModel.html'>YAHOO.ext.grid.AbstractDataModel</a>
|
||||
|
|
||||
+--<b>YAHOO.ext.grid.DefaultDataModel</b>
|
||||
</PRE>
|
||||
|
||||
<DL>
|
||||
<DT>
|
||||
<B>Direct Known Subclasses:</B>
|
||||
<DD>
|
||||
<a href="YAHOO.ext.grid.LoadableDataModel.html">YAHOO.ext.grid.LoadableDataModel</a>
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>YAHOO.ext.grid.DefaultDataModel</B>
|
||||
|
||||
<DT>extends <a href='YAHOO.ext.grid.AbstractDataModel.html'>YAHOO.ext.grid.AbstractDataModel</a>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR/>This is the default implementation of a DataModel used by the Grid. It works
|
||||
with multi-dimensional array based data. Using the event system in the base class
|
||||
<a href="YAHOO.ext.grid.AbstractDataModel.html#">YAHOO.ext.grid.AbstractDataModel</a>, all updates to this DataModel are automatically
|
||||
reflected in the user interface.
|
||||
<br>Usage:<br>
|
||||
<pre><code>
|
||||
var myData = [
|
||||
["MSFT","Microsoft Corporation", "314,571.156", "32,187.000", "55000"],
|
||||
["ORCL", "Oracle Corporation", "62,615.266", "9,519.000", "40650"]
|
||||
];
|
||||
var dataModel = new YAHOO.ext.grid.DefaultDataModel(myData);
|
||||
</code></pre>
|
||||
<BR/><I>Defined in <a href='overview-summary-DefaultDataModel.js.html'>DefaultDataModel.js</a></I><BR/><BR/>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
|
||||
|
||||
<A NAME=""><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD class="title-cell"><B>Fields inherited from class <A HREF="YAHOO.ext.grid.AbstractDataModel.html">YAHOO.ext.grid.AbstractDataModel</A></B></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE>
|
||||
<a href="YAHOO.ext.grid.AbstractDataModel.html#onCellUpdated">onCellUpdated</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#onTableDataChanged">onTableDataChanged</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#onRowsDeleted">onRowsDeleted</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#onRowsInserted">onRowsInserted</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#onRowsUpdated">onRowsUpdated</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#onRowsSorted">onRowsSorted</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#events">events</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#addListener">addListener</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#removeListener">removeListener</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#fireEvent">fireEvent</a>
|
||||
</CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN="2" class="title-cell">
|
||||
Constructor Summary
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="YAHOO.ext.grid.DefaultDataModel.html#YAHOO.ext.grid.DefaultDataModel()">YAHOO.ext.grid.DefaultDataModel</A>
|
||||
</B>
|
||||
(data)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN="2" class="title-cell">
|
||||
<span style="float:left">Method Summary</span>
|
||||
<span style="float:right;font-weight:normal;font-size:8pt;">
|
||||
<i>* Parameter types in italic indicate optional parameters</i>
|
||||
</span>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Number</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#addRow">addRow</A></B>(<Array> cellValues)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Adds a row to the dataset.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#applySort">applySort</A></B>(suppressEvent)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Applies the last used sort to the current data.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Number</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#filter">filter</A></B>(<Object> query)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Filter the DataModel rows by the query defined in spec, see <a href="#query">query()</a> for more details
|
||||
on the query spec.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Array</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getRow">getRow</A></B>(rowIndex)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the column data for the specified row.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Number</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getRowCount">getRowCount</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the number of rows in the dataset
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Number</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getRowId">getRowId</A></B>(rowIndex)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the ID of the specified row.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Array</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getRows">getRows</A></B>(<Array> indexes)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the column data for the specified rows as a
|
||||
multi-dimensional array: rows[3][0] would give you the value of row 4, column 0.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Object</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getValueAt">getValueAt</A></B>(<Number> rowIndex, <Number> colIndex)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the value at the specified data position
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Number</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#insertRow">insertRow</A></B>(<Number> index, <Array> cellValues)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Inserts a row a the specified location in the dataset.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Array</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#query">query</A></B>(<Object> spec, <Boolean> returnUnmatched)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Query the DataModel rows by the filters defined in spec, for example...
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#removeRow">removeRow</A></B>(<Number> index)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Remove a row.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#setDefaultSort">setDefaultSort</A></B>(columnModel, columnIndex, direction)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#setValueAt">setValueAt</A></B>(<Object> value, <Number> rowIndex, <Number> colIndex)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Sets the specified value at the specified data position
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#sort">sort</A></B>(<<a href="YAHOO.ext.grid.DefaultColumnModel.html">YAHOO.ext.grid.DefaultColumnModel</a>> columnModel, <Number> columnIndex, <String> direction, suppressEvent)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Sorts the data by the specified column - Uses the sortType specified for the column in the passed columnModel.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD class="title-cell"><B>Methods inherited from class <a href="YAHOO.ext.grid.AbstractDataModel.html">YAHOO.ext.grid.AbstractDataModel</a></B></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE>
|
||||
<!-- Inherited methods -->
|
||||
<a href="YAHOO.ext.grid.AbstractDataModel.html#fireCellUpdated">fireCellUpdated</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#fireTableDataChanged">fireTableDataChanged</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#fireRowsDeleted">fireRowsDeleted</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#fireRowsInserted">fireRowsInserted</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#fireRowsUpdated">fireRowsUpdated</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#fireRowsSorted">fireRowsSorted</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#getSortState">getSortState</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#getTotalRowCount">getTotalRowCount</a>, <a href="YAHOO.ext.grid.AbstractDataModel.html#isPaged">isPaged</a>
|
||||
</CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN="1" class="title-cell">
|
||||
Constructor Detail
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="YAHOO.ext.grid.DefaultDataModel()"><!-- --></A><H3>
|
||||
YAHOO.ext.grid.DefaultDataModel</H3>
|
||||
<PRE><B>YAHOO.ext.grid.DefaultDataModel</B>(data)</PRE>
|
||||
|
||||
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN="1" class="title-cell">
|
||||
Method Detail
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="addRow"><!-- --></A>
|
||||
<H3>addRow</H3>
|
||||
<PRE>Number <B>addRow</B>(<Array> cellValues)</PRE>
|
||||
|
||||
<UL>Adds a row to the dataset.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>cellValues</CODE> - The array of values for the new row
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The index of the added row
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="applySort"><!-- --></A>
|
||||
<H3>applySort</H3>
|
||||
<PRE>void <B>applySort</B>(suppressEvent)</PRE>
|
||||
|
||||
<UL>Applies the last used sort to the current data.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="filter"><!-- --></A>
|
||||
<H3>filter</H3>
|
||||
<PRE>Number <B>filter</B>(<Object> query)</PRE>
|
||||
|
||||
<UL>Filter the DataModel rows by the query defined in spec, see <a href="#query">query()</a> for more details
|
||||
on the query spec.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>query</CODE> - The query spec <a href="#query">query()</a>
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The number of rows removed
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getRow"><!-- --></A>
|
||||
<H3>getRow</H3>
|
||||
<PRE>Array <B>getRow</B>(rowIndex)</PRE>
|
||||
|
||||
<UL>Returns the column data for the specified row.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getRowCount"><!-- --></A>
|
||||
<H3>getRowCount</H3>
|
||||
<PRE>Number <B>getRowCount</B>()</PRE>
|
||||
|
||||
<UL>Returns the number of rows in the dataset</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getRowId"><!-- --></A>
|
||||
<H3>getRowId</H3>
|
||||
<PRE>Number <B>getRowId</B>(rowIndex)</PRE>
|
||||
|
||||
<UL>Returns the ID of the specified row. By default it return the value of the first column.
|
||||
Override to provide more advanced ID handling.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getRows"><!-- --></A>
|
||||
<H3>getRows</H3>
|
||||
<PRE>Array <B>getRows</B>(<Array> indexes)</PRE>
|
||||
|
||||
<UL>Returns the column data for the specified rows as a
|
||||
multi-dimensional array: rows[3][0] would give you the value of row 4, column 0.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>indexes</CODE> - The row indexes to fetch
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getValueAt"><!-- --></A>
|
||||
<H3>getValueAt</H3>
|
||||
<PRE>Object <B>getValueAt</B>(<Number> rowIndex, <Number> colIndex)</PRE>
|
||||
|
||||
<UL>Returns the value at the specified data position</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>rowIndex</CODE> -
|
||||
</UL>
|
||||
|
||||
<UL><CODE>colIndex</CODE> -
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="insertRow"><!-- --></A>
|
||||
<H3>insertRow</H3>
|
||||
<PRE>Number <B>insertRow</B>(<Number> index, <Array> cellValues)</PRE>
|
||||
|
||||
<UL>Inserts a row a the specified location in the dataset.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>index</CODE> - The index where the row should be inserted
|
||||
</UL>
|
||||
|
||||
<UL><CODE>cellValues</CODE> - The array of values for the new row
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The index the row was inserted in
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="query"><!-- --></A>
|
||||
<H3>query</H3>
|
||||
<PRE>Array <B>query</B>(<Object> spec, <Boolean> returnUnmatched)</PRE>
|
||||
|
||||
<UL>Query the DataModel rows by the filters defined in spec, for example...
|
||||
<pre><code>
|
||||
// column 1 starts with Jack, column 2 filtered by myFcn, column 3 equals 'Fred'
|
||||
dataModel.filter({1: /^Jack.+/i}, 2: myFcn, 3: 'Fred'});
|
||||
</code></pre></UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>spec</CODE> - The spec is generally an object literal consisting of column index and filter type. The filter type can be a string/number (exact match), a regular expression to test using String.search() or a function to call. If it's a function, it will be called with the value for the specified column and an array of the all column values for that row: yourFcn(value, columnData). If it returns anything other than true, the row is not a match.
|
||||
</UL>
|
||||
|
||||
<UL><CODE>returnUnmatched</CODE> - True to return rows which <b>don't</b> match the query instead of rows that do match
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
An array of row indexes that match
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="removeRow"><!-- --></A>
|
||||
<H3>removeRow</H3>
|
||||
<PRE>void <B>removeRow</B>(<Number> index)</PRE>
|
||||
|
||||
<UL>Remove a row.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>index</CODE> -
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="setDefaultSort"><!-- --></A>
|
||||
<H3>setDefaultSort</H3>
|
||||
<PRE>void <B>setDefaultSort</B>(columnModel, columnIndex, direction)</PRE>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="setValueAt"><!-- --></A>
|
||||
<H3>setValueAt</H3>
|
||||
<PRE>void <B>setValueAt</B>(<Object> value, <Number> rowIndex, <Number> colIndex)</PRE>
|
||||
|
||||
<UL>Sets the specified value at the specified data position</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>value</CODE> - The new value
|
||||
</UL>
|
||||
|
||||
<UL><CODE>rowIndex</CODE> -
|
||||
</UL>
|
||||
|
||||
<UL><CODE>colIndex</CODE> -
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="sort"><!-- --></A>
|
||||
<H3>sort</H3>
|
||||
<PRE>void <B>sort</B>(<<a href="YAHOO.ext.grid.DefaultColumnModel.html">YAHOO.ext.grid.DefaultColumnModel</a>> columnModel, <Number> columnIndex, <String> direction, suppressEvent)</PRE>
|
||||
|
||||
<UL>Sorts the data by the specified column - Uses the sortType specified for the column in the passed columnModel.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>columnModel</CODE> - The ColumnModel for this dataset
|
||||
</UL>
|
||||
|
||||
<UL><CODE>columnIndex</CODE> - The column index to sort by
|
||||
</UL>
|
||||
|
||||
<UL><CODE>direction</CODE> - The direction of the sort ('DESC' or 'ASC')
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Sat Oct 14 06:07:10 2006</div>
|
||||
</BODY>
|
||||
</HTML>
|
||||
Loading…
Add table
Add a link
Reference in a new issue