1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <title>API: datatable Column (YUI Library)
</title>
5 <link rel=
"stylesheet" type=
"text/css" href=
"assets/api.css">
9 <div id=
"doc3" class=
"yui-t2">
12 <h1>Yahoo! UI Library
</h1>
13 <h3>DataTable Widget
<span class=
"subtitle">2.2.0</span></h3>
15 <a href=
"./index.html">Yahoo! UI Library
</a>
16 > <a href=
"./module_datatable.html">datatable
</a>
33 <span class=
"extends">
36 <span class=
"extends">
41 <!-- class tree goes here -->
46 <div class=
"summary description">
47 The Column class defines and manages attributes of DataTable Columns
50 <div class=
"section constructor details">
51 <h3><a name=
"constructor_detail">Constructor
</a></h3>
54 <strong>Column
</strong>
63 <div class=
"description">
70 Object literal of configuration values.
80 <div class=
"section field details">
81 <h3><a name=
"field_detail">Properties
</a></h3>
83 <h4><a name=
"_children">_children
</a>
84 <code>- private YAHOO.widget.Column[]
</code>
87 <div class=
"description">
88 Array of Column's chilren, or null.
96 <h4><a name=
"_colspan">_colspan
</a>
97 <code>- private Number
</code>
100 <div class=
"description">
101 Number of table cells the Column spans.
109 <h4><a name=
"_id">_id
</a>
110 <code>- private String
</code>
113 <div class=
"description">
114 Unique ID, also assigned as DOM ID.
122 <h4><a name=
"_index">_index
</a>
123 <code>- private Number
</code>
126 <div class=
"description">
127 Reference to Column's index within its ColumnSet's key array, or null if not applicable.
135 <h4><a name=
"_minWidth">_minWidth
</a>
136 <code>- private Number
</code>
139 <div class=
"description">
140 Minimum width the Column can support (in pixels). Value is populated only if table
141 is fixedwidth, null otherwise.
149 <h4><a name=
"_nCount">_nCount
</a>
150 <code>- static Number
</code>
153 <div class=
"description">
154 Internal instance counter.
159 <div class=
"default">
165 <h4><a name=
"_parent">_parent
</a>
166 <code>- private YAHOO.widget.Column
</code>
169 <div class=
"description">
170 Column's parent, or null.
178 <h4><a name=
"_rowspan">_rowspan
</a>
179 <code>- private Number
</code>
182 <div class=
"description">
183 Number of table rows the Column spans.
191 <h4><a name=
"_width">_width
</a>
192 <code>- private Number
</code>
195 <div class=
"description">
196 Current offsetWidth of the Column (in pixels).
204 <h4><a name=
"abbr">abbr
</a>
205 <code>- String
</code>
208 <div class=
"description">
209 Column head cell ABBR for accessibility.
217 <h4><a name=
"children">children
</a>
218 <code>- Object[]
</code>
221 <div class=
"description">
222 Array of object literals that define children (nested headers) of a Column.
230 <h4><a name=
"className">className
</a>
231 <code>- String
</code>
234 <div class=
"description">
235 Custom CSS class to be applied to every cell in the Column.
243 <h4><a name=
"editor">editor
</a>
244 <code>- String
</code>
247 <div class=
"description">
248 Defines the type of editor for Column, otherwise Column is not editable.
256 <h4><a name=
"formatter">formatter
</a>
257 <code>- HTMLFunction
</code>
260 <div class=
"description">
261 Defines a custom format function for Column, otherwise default is used,
262 according to Column type.
270 <h4><a name=
"key">key
</a>
271 <code>- String
</code>
274 <div class=
"description">
275 Associated database field, or null.
283 <h4><a name=
"parser">parser
</a>
284 <code>- HTMLFunction
</code>
287 <div class=
"description">
288 Defines a custom parse function for Column, otherwise default is used,
289 according to Column type.
297 <h4><a name=
"resizeable">resizeable
</a>
298 <code>- Boolean
</code>
301 <div class=
"description">
302 True if Column is resizeable, false otherwise.
307 <div class=
"default">
313 <h4><a name=
"sortable">sortable
</a>
314 <code>- Boolean
</code>
317 <div class=
"description">
318 True if Column is sortable, false otherwise.
323 <div class=
"default">
329 <h4><a name=
"sortOptions.ascFunction">sortOptions.ascFunction
</a>
330 <code>- Function
</code>
333 <div class=
"description">
334 Custom sort handler to arrange Column in ascending order.
339 <div class=
"default">
345 <h4><a name=
"sortOptions.descFunction">sortOptions.descFunction
</a>
346 <code>- Function
</code>
349 <div class=
"description">
350 Custom sort handler to arrange Column in descending order.
355 <div class=
"default">
361 <h4><a name=
"text">text
</a>
362 <code>- String
</code>
365 <div class=
"description">
366 Text or HTML for display in Column's assocated TH element.
374 <h4><a name=
"type">type
</a>
375 <code>- String
</code>
378 <div class=
"description">
379 Data types:
"string",
"number",
"date",
"currency",
"checkbox",
"select",
385 <div class=
"default">
386 Default Value:
"string"
391 <h4><a name=
"width">width
</a>
392 <code>- String
</code>
395 <div class=
"description">
410 <div class=
"section method details">
411 <h3><a name=
"methodDetails">Methods
</a></h3>
412 <div class=
"content">
414 <a name=
"format">format
</a></h4>
421 <strong>format
</strong>
435 <div class=
"description">
436 Outputs markup into the given TD based on given Record.
439 <div class=
"description">
444 <code>elCell
<HTMLElement
></code>
445 TD to format for display.
448 <code>oRecord
<YAHOO.widget.Record
></code>
449 Record that holds data for the row.
466 <a name=
"formatCheckbox">formatCheckbox
</a></h4>
473 <strong>formatCheckbox
</strong>
495 <div class=
"description">
496 Formats cells in Columns of type
"checkbox".
499 <div class=
"description">
504 <code>elCell
<HTMLElement
></code>
508 <code>oRecord
<YAHOO.widget.Record
></code>
512 <code>oColumn
<YAHOO.widget.Column
></code>
516 <code>oData
<Object
></code>
517 Data value for the cell, or null
534 <a name=
"formatCurrency">formatCurrency
</a></h4>
541 <strong>formatCurrency
</strong>
563 <div class=
"description">
564 Formats cells in Columns of type
"currency". Can be overridden for custom formatting.
567 <div class=
"description">
572 <code>elCell
<HTMLElement
></code>
576 <code>oRecord
<YAHOO.widget.Record
></code>
580 <code>oColumn
<YAHOO.widget.Column
></code>
584 <code>oData
<Object
></code>
585 Data value for the cell, or null
602 <a name=
"formatDate">formatDate
</a></h4>
609 <strong>formatDate
</strong>
631 <div class=
"description">
632 Formats cells in Columns of type
"date".
635 <div class=
"description">
640 <code>elCell
<HTMLElement
></code>
644 <code>oRecord
<YAHOO.widget.Record
></code>
648 <code>oColumn
<YAHOO.widget.Column
></code>
652 <code>oData
<Object
></code>
653 Data value for the cell, or null
670 <a name=
"formatEmail">formatEmail
</a></h4>
677 <strong>formatEmail
</strong>
699 <div class=
"description">
700 Formats cells in Columns of type
"email".
703 <div class=
"description">
708 <code>elCell
<HTMLElement
></code>
712 <code>oRecord
<YAHOO.widget.Record
></code>
716 <code>oColumn
<YAHOO.widget.Column
></code>
720 <code>oData
<Object
></code>
721 Data value for the cell, or null
738 <a name=
"formatLink">formatLink
</a></h4>
745 <strong>formatLink
</strong>
767 <div class=
"description">
768 Formats cells in Columns of type
"link".
771 <div class=
"description">
776 <code>elCell
<HTMLElement
></code>
780 <code>oRecord
<YAHOO.widget.Record
></code>
784 <code>oColumn
<YAHOO.widget.Column
></code>
788 <code>oData
<Object
></code>
789 Data value for the cell, or null
806 <a name=
"formatNumber">formatNumber
</a></h4>
813 <strong>formatNumber
</strong>
835 <div class=
"description">
836 Formats cells in Columns of type
"number".
839 <div class=
"description">
844 <code>elCell
<HTMLElement
></code>
848 <code>oRecord
<YAHOO.widget.Record
></code>
852 <code>oColumn
<YAHOO.widget.Column
></code>
856 <code>oData
<Object
></code>
857 Data value for the cell, or null
874 <a name=
"formatSelect">formatSelect
</a></h4>
881 <strong>formatSelect
</strong>
903 <div class=
"description">
904 Formats cells in Columns of type
"select".
907 <div class=
"description">
912 <code>elCell
<HTMLElement
></code>
916 <code>oRecord
<YAHOO.widget.Record
></code>
920 <code>oColumn
<YAHOO.widget.Column
></code>
924 <code>oData
<Object
></code>
925 Data value for the cell, or null
942 <a name=
"getColSpan">getColSpan
</a></h4>
949 <strong>getColSpan
</strong>
954 <div class=
"description">
955 Public accessor returns Column's colspan number.
958 <div class=
"description">
966 <dd>Column's colspan number.
</dd>
974 <a name=
"getId">getId
</a></h4>
981 <strong>getId
</strong>
986 <div class=
"description">
987 Public accessor returns Column's ID string.
990 <div class=
"description">
998 <dd>Column's ID string.
</dd>
1006 <a name=
"getRowSpan">getRowSpan
</a></h4>
1007 <div class=
"detail">
1013 <strong>getRowSpan
</strong>
1018 <div class=
"description">
1019 Public accessor returns Column's rowspan number.
1022 <div class=
"description">
1030 <dd>Column's rowspan number.
</dd>
1038 <a name=
"parse">parse
</a></h4>
1039 <div class=
"detail">
1045 <strong>parse
</strong>
1055 <div class=
"description">
1056 Takes innerHTML from TD and parses out data for storage in RecordSet.
1059 <div class=
"description">
1062 <dt>Parameters:
</dt>
1064 <code>sMarkup
<String
></code>
1065 The TD's innerHTML value.
1082 <a name=
"parseCheckbox">parseCheckbox
</a></h4>
1083 <div class=
"detail">
1089 <strong>parseCheckbox
</strong>
1099 <div class=
"description">
1100 Default parse function for Columns of type
"checkbox" takes markup and
1101 extracts data. Can be overridden for custom parsing.
1104 <div class=
"description">
1107 <dt>Parameters:
</dt>
1109 <code>sMarkup
<object
></code>
1119 <dd>True if checkbox is checked.
</dd>
1127 <a name=
"parseCurrency">parseCurrency
</a></h4>
1128 <div class=
"detail">
1134 <strong>parseCurrency
</strong>
1144 <div class=
"description">
1145 Default parse function for Columns of type
"currency" takes markup and
1146 extracts data. Can be overridden for custom parsing.
1149 <div class=
"description">
1152 <dt>Parameters:
</dt>
1154 <code>sMarkup
<object
></code>
1164 <dd>Floating point amount.
</dd>
1172 <a name=
"parseDate">parseDate
</a></h4>
1173 <div class=
"detail">
1179 <strong>parseDate
</strong>
1189 <div class=
"description">
1190 Default parse function for Columns of type
"date" takes markup and extracts
1191 data. Can be overridden for custom parsing.
1194 <div class=
"description">
1197 <dt>Parameters:
</dt>
1199 <code>sMarkup
<object
></code>
1209 <dd>Date instance.
</dd>
1217 <a name=
"parseNumber">parseNumber
</a></h4>
1218 <div class=
"detail">
1224 <strong>parseNumber
</strong>
1234 <div class=
"description">
1235 Default parse function for Columns of type
"number" takes markup and extracts
1236 data. Can be overridden for custom parsing.
1239 <div class=
"description">
1242 <dt>Parameters:
</dt>
1244 <code>sMarkup
<object
></code>
1262 <a name=
"parseSelect">parseSelect
</a></h4>
1263 <div class=
"detail">
1269 <strong>parseSelect
</strong>
1279 <div class=
"description">
1280 Default parse function for Columns of type
"select" takes markup and extracts
1281 data. Can be overridden for custom parsing.
1284 <div class=
"description">
1287 <dt>Parameters:
</dt>
1289 <code>sMarkup
<object
></code>
1299 <dd>Value of selected option.
</dd>
1307 <a name=
"showEditor">showEditor
</a></h4>
1308 <div class=
"detail">
1314 <strong>showEditor
</strong>
1328 <div class=
"description">
1329 Outputs editor markup into the given TD based on given Record.
1332 <div class=
"description">
1335 <dt>Parameters:
</dt>
1337 <code>elCell
<HTMLElement
></code>
1341 <code>oRecord
<YAHOO.widget.Record
></code>
1342 The DataTable Record of the cell.
1351 <dd>YAHOO.widget.ColumnEditor
</dd>
1372 <div class=
"module">
1374 <ul class=
"content">
1376 <li class=
""><a href=
"module_animation.html">animation
</a></li>
1378 <li class=
""><a href=
"module_autocomplete.html">autocomplete
</a></li>
1380 <li class=
""><a href=
"module_button.html">button
</a></li>
1382 <li class=
""><a href=
"module_calendar.html">calendar
</a></li>
1384 <li class=
""><a href=
"module_connection.html">connection
</a></li>
1386 <li class=
""><a href=
"module_container.html">container
</a></li>
1388 <li class=
""><a href=
"module_datasource.html">datasource
</a></li>
1390 <li class=
"selected"><a href=
"module_datatable.html">datatable
</a></li>
1392 <li class=
""><a href=
"module_dom.html">dom
</a></li>
1394 <li class=
""><a href=
"module_dragdrop.html">dragdrop
</a></li>
1396 <li class=
""><a href=
"module_element.html">element
</a></li>
1398 <li class=
""><a href=
"module_event.html">event
</a></li>
1400 <li class=
""><a href=
"module_history.html">history
</a></li>
1402 <li class=
""><a href=
"module_logger.html">logger
</a></li>
1404 <li class=
""><a href=
"module_menu.html">menu
</a></li>
1406 <li class=
""><a href=
"module_slider.html">slider
</a></li>
1408 <li class=
""><a href=
"module_tabview.html">tabview
</a></li>
1410 <li class=
""><a href=
"module_treeview.html">treeview
</a></li>
1412 <li class=
""><a href=
"module_yahoo.html">yahoo
</a></li>
1416 <div class=
"module">
1418 <ul class=
"content">
1419 <li class=
"selected"><a href=
"Column.html">Column
</a></li>
1420 <li class=
""><a href=
"ColumnEditor.html">ColumnEditor
</a></li>
1421 <li class=
""><a href=
"ColumnSet.html">ColumnSet
</a></li>
1422 <li class=
""><a href=
"DataTable.html">DataTable
</a></li>
1423 <li class=
""><a href=
"Record.html">Record
</a></li>
1424 <li class=
""><a href=
"RecordSet.html">RecordSet
</a></li>
1425 <li class=
""><a href=
"Sort.html">Sort
</a></li>
1426 <li class=
""><a href=
"WidthResizer.html">WidthResizer
</a></li>
1430 <div class=
"module">
1432 <ul class=
"content">
1433 <li class=
""><a href=
"ColumnSet.js.html">ColumnSet.js
</a></li>
1434 <li class=
""><a href=
"DataTable.js.html">DataTable.js
</a></li>
1435 <li class=
""><a href=
"RecordSet.js.html">RecordSet.js
</a></li>
1439 <div class=
"module">
1441 <ul class=
"content">
1442 <li><a href=
"#_children">_children
</a>
1443 <!--<code><String></code>-->
1445 <li><a href=
"#_colspan">_colspan
</a>
1446 <!--<code><String></code>-->
1448 <li><a href=
"#_id">_id
</a>
1449 <!--<code><String></code>-->
1451 <li><a href=
"#_index">_index
</a>
1452 <!--<code><String></code>-->
1454 <li><a href=
"#_minWidth">_minWidth
</a>
1455 <!--<code><String></code>-->
1457 <li><a href=
"#_nCount">_nCount
</a>
1458 <!--<code><String></code>-->
1460 <li><a href=
"#_parent">_parent
</a>
1461 <!--<code><String></code>-->
1463 <li><a href=
"#_rowspan">_rowspan
</a>
1464 <!--<code><String></code>-->
1466 <li><a href=
"#_width">_width
</a>
1467 <!--<code><String></code>-->
1469 <li><a href=
"#abbr">abbr
</a>
1470 <!--<code><String></code>-->
1472 <li><a href=
"#children">children
</a>
1473 <!--<code><String></code>-->
1475 <li><a href=
"#className">className
</a>
1476 <!--<code><String></code>-->
1478 <li><a href=
"#editor">editor
</a>
1479 <!--<code><String></code>-->
1481 <li><a href=
"#formatter">formatter
</a>
1482 <!--<code><String></code>-->
1484 <li><a href=
"#key">key
</a>
1485 <!--<code><String></code>-->
1487 <li><a href=
"#parser">parser
</a>
1488 <!--<code><String></code>-->
1490 <li><a href=
"#resizeable">resizeable
</a>
1491 <!--<code><String></code>-->
1493 <li><a href=
"#sortable">sortable
</a>
1494 <!--<code><String></code>-->
1496 <li><a href=
"#sortOptions.ascFunction">sortOptions.ascFunction
</a>
1497 <!--<code><String></code>-->
1499 <li><a href=
"#sortOptions.descFunction">sortOptions.descFunction
</a>
1500 <!--<code><String></code>-->
1502 <li><a href=
"#text">text
</a>
1503 <!--<code><String></code>-->
1505 <li><a href=
"#type">type
</a>
1506 <!--<code><String></code>-->
1508 <li><a href=
"#width">width
</a>
1509 <!--<code><String></code>-->
1514 <div class=
"module">
1516 <ul class=
"content">
1517 <li><!--<code>HTML</code>-->
1518 <a href=
"#format">format
</a>
1520 <li><!--<code>void</code>-->
1521 <a href=
"#formatCheckbox">formatCheckbox
</a>
1523 <li><!--<code>void</code>-->
1524 <a href=
"#formatCurrency">formatCurrency
</a>
1526 <li><!--<code>void</code>-->
1527 <a href=
"#formatDate">formatDate
</a>
1529 <li><!--<code>void</code>-->
1530 <a href=
"#formatEmail">formatEmail
</a>
1532 <li><!--<code>void</code>-->
1533 <a href=
"#formatLink">formatLink
</a>
1535 <li><!--<code>void</code>-->
1536 <a href=
"#formatNumber">formatNumber
</a>
1538 <li><!--<code>void</code>-->
1539 <a href=
"#formatSelect">formatSelect
</a>
1541 <li><!--<code>Number</code>-->
1542 <a href=
"#getColSpan">getColSpan
</a>
1544 <li><!--<code>String</code>-->
1545 <a href=
"#getId">getId
</a>
1547 <li><!--<code>Number</code>-->
1548 <a href=
"#getRowSpan">getRowSpan
</a>
1550 <li><!--<code>Object</code>-->
1551 <a href=
"#parse">parse
</a>
1553 <li><!--<code>bChecked</code>-->
1554 <a href=
"#parseCheckbox">parseCheckbox
</a>
1556 <li><!--<code>nAmount</code>-->
1557 <a href=
"#parseCurrency">parseCurrency
</a>
1559 <li><!--<code>oDate</code>-->
1560 <a href=
"#parseDate">parseDate
</a>
1562 <li><!--<code>nNumber</code>-->
1563 <a href=
"#parseNumber">parseNumber
</a>
1565 <li><!--<code>sValue</code>-->
1566 <a href=
"#parseSelect">parseSelect
</a>
1568 <li><!--<code>void</code>-->
1569 <a href=
"#showEditor">showEditor
</a>
1581 Copyright
© 2007 Yahoo! Inc. All rights reserved.