<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Wt: Wt::Ext::TableView Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Wt  <span id="projectnumber">3.2.3</span> </div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.5.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a> </li> <li class="navelem"><a class="el" href="namespaceWt_1_1Ext.html">Ext</a> </li> <li class="navelem"><a class="el" href="classWt_1_1Ext_1_1TableView.html">TableView</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-methods">Static Public Member Functions</a> </div> <div class="headertitle"> <div class="title">Wt::Ext::TableView Class Reference<div class="ingroups"><a class="el" href="group__ext.html">Ext widgets (Wt::Ext, deprecated)</a></div></div> </div> </div> <div class="contents"> <!-- doxytag: class="Wt::Ext::TableView" --><!-- doxytag: inherits="Wt::Ext::Panel" --> <p>A widget that displays data in a table. <a href="classWt_1_1Ext_1_1TableView.html#details">More...</a></p> <p><code>#include <Wt/Ext/TableView></code></p> <div class="dynheader"> Inheritance diagram for Wt::Ext::TableView:</div> <div class="dyncontent"> <div class="center"><img src="classWt_1_1Ext_1_1TableView__inherit__graph.png" border="0" usemap="#Wt_1_1Ext_1_1TableView_inherit__map" alt="Inheritance graph"/></div> <map name="Wt_1_1Ext_1_1TableView_inherit__map" id="Wt_1_1Ext_1_1TableView_inherit__map"> <area shape="rect" href="classWt_1_1Ext_1_1Panel.html" title="A container with a title and standard GUI elements." alt="" coords="21,453,128,480"/><area shape="rect" href="classWt_1_1Ext_1_1Container.html" title="A container class which manages its contents using layout managers." alt="" coords="11,379,139,405"/><area shape="rect" href="classWt_1_1Ext_1_1Component.html" title="An abstract base class for widgets that can be visually disabled." alt="" coords="5,304,144,331"/><area shape="rect" href="classWt_1_1Ext_1_1Widget.html" title="An abstract base class for all Ext widgets." alt="" coords="17,229,132,256"/><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="11,155,139,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user-interface component." alt="" coords="25,80,124,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="27,5,123,32"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classWt_1_1Ext_1_1TableView-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#af982555ad58c7e846dbe829f10a5e09b">TableView</a> (<a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new table view. <a href="#af982555ad58c7e846dbe829f10a5e09b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#ae749720b6992ecf62a900bbc45a5607d">setModel</a> (<a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a> *model)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Specify the model. <a href="#ae749720b6992ecf62a900bbc45a5607d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#aa28bbad6fef68f903fed1aa01303c3ce">model</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the model. <a href="#aa28bbad6fef68f903fed1aa01303c3ce"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a300cede33cdf30af4f7543de794e72f2">resizeColumnsToContents</a> (bool onResize=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Let the table view resize columns to fit their contents. <a href="#a300cede33cdf30af4f7543de794e72f2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a88f1de406a741b47533311d249a168dc">setAutoExpandColumn</a> (int column, int minWidth=50, int maxWidth=1000)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the column which will auto-expand to take the remaining space. <a href="#a88f1de406a741b47533311d249a168dc"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4616220e3e1153b6825e1a7d5cd8b374"></a><!-- doxytag: member="Wt::Ext::TableView::autoExpandColumn" ref="a4616220e3e1153b6825e1a7d5cd8b374" args="() const " --> int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a4616220e3e1153b6825e1a7d5cd8b374">autoExpandColumn</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the column index of the column that auto-expands. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a11f1507b4db23da74cf54741a4b40b00">setDataLocation</a> (<a class="el" href="group__ext.html#ga5bc908c6e6aa90646cca1276d68cb2b2">DataLocation</a> dataLocation)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Configure the location of the data. <a href="#a11f1507b4db23da74cf54741a4b40b00"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#ad8527a57c1004097937befe83633d998">setColumnsMovable</a> (bool movable)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Allow the user to move columns using drag and drop. <a href="#ad8527a57c1004097937befe83633d998"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#aab8ed89a0c658fffad2f3e4cb575450d">columnsMovable</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return if columns are movable. <a href="#aab8ed89a0c658fffad2f3e4cb575450d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#aeca778394c0c4165cb890624e7f26f68">setAlternatingRowColors</a> (bool enable)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="namespaceWt_1_1Render.html" title="Namespace for the XHTML Rendering (Wt::Render).">Render</a> rows with alternating colors. <a href="#aeca778394c0c4165cb890624e7f26f68"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a36e7290ea7fb21f7785ce4825e4c6222">alternatingRowColors</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return if rows are rendered with alternating colors. <a href="#a36e7290ea7fb21f7785ce4825e4c6222"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a82aa7b9fd7931c064a85624167777dde">setHighlightMouseOver</a> (bool highlight)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Configure if the row under the mouse will be highlighted. <a href="#a82aa7b9fd7931c064a85624167777dde"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abbf14ebf04eba309570653f22a6ff22e"></a><!-- doxytag: member="Wt::Ext::TableView::highlightMouseOver" ref="abbf14ebf04eba309570653f22a6ff22e" args="() const " --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#abbf14ebf04eba309570653f22a6ff22e">highlightMouseOver</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return if the row under the mouse will be highlighted. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#ae6f70012b68f37b8acaa16042f805178">setColumnHidden</a> (int column, bool hide)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Change the visibility of a column. <a href="#ae6f70012b68f37b8acaa16042f805178"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#aee2e7e8094023cd8c001b01cf520d7d2">isColumnHidden</a> (int column) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return if a column is hidden. <a href="#aee2e7e8094023cd8c001b01cf520d7d2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a1c9f10b2affca162eca145d624d0f49e">hideColumn</a> (int column)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Hide a column. <a href="#a1c9f10b2affca162eca145d624d0f49e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a6fba01c5bc5bf18b2d28a5ea394292b7">showColumn</a> (int column)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Show a column. <a href="#a6fba01c5bc5bf18b2d28a5ea394292b7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a0618d71520e5c0c5da46beb30100e634">setColumnWidth</a> (int column, int pixels)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the column width (in pixels) for a column. <a href="#a0618d71520e5c0c5da46beb30100e634"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#ae3892620e188e2b95cec6af949fa3a07">columnWidth</a> (int column) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the column width. <a href="#ae3892620e188e2b95cec6af949fa3a07"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#ac4dfbc43791653d6aa4fa1e7517d7523">setColumnAlignment</a> (int column, <a class="el" href="namespaceWt.html#ab8f772c69bc8180c31f9e4f4593b143f">AlignmentFlag</a> alignment)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the horizontal content alignment of a column. <a href="#ac4dfbc43791653d6aa4fa1e7517d7523"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceWt.html#ab8f772c69bc8180c31f9e4f4593b143f">AlignmentFlag</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a44ad9387f03c949018642effbc444146">columnAlignment</a> (int column) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the horizontal content alignment of a column. <a href="#a44ad9387f03c949018642effbc444146"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#abb2e0f5c6576335c86141183a10029ec">setColumnSortable</a> (int column, bool sortable)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Allow a column to be sorted by the user. <a href="#abb2e0f5c6576335c86141183a10029ec"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a20d295f97b290e9afb4568e026e4c965">isColumnSortable</a> (int column) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return if a column is sortable. <a href="#a20d295f97b290e9afb4568e026e4c965"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#acc3f7c2dbae0a063eed5fad7892c77a2">enableColumnHiding</a> (int column, bool enable)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Allow a column to be hidden through its context menu. <a href="#acc3f7c2dbae0a063eed5fad7892c77a2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a5b6670edddd105298c67d37167d330fd">isColumnHidingEnabled</a> (int column) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return if a column may be hidden through its context menu. <a href="#a5b6670edddd105298c67d37167d330fd"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a8fce08c9e2b06463377342e03f2970d2">setEditor</a> (int column, <a class="el" href="classWt_1_1Ext_1_1FormField.html">FormField</a> *editor)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Configure an editor for the given column. <a href="#a8fce08c9e2b06463377342e03f2970d2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#acd1c2e98bd5420e398053ab6b6d4e7f0">setRenderer</a> (int column, const std::string &rendererJS)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Configure a custom renderer for the given column. <a href="#acd1c2e98bd5420e398053ab6b6d4e7f0"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a9b8be64acea3d9df598fd418d0b0e55a">setPageSize</a> (int pageSize)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Configure a page size to browse the data page by page. <a href="#a9b8be64acea3d9df598fd418d0b0e55a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a71bcd2818831c21a68202fe4e53552ab">pageSize</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the page size. <a href="#a71bcd2818831c21a68202fe4e53552ab"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Ext_1_1ToolBar.html">ToolBar</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a0e09b1cd5b493f577f5a89c4b4916c44">createPagingToolBar</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a paging tool bar. <a href="#a0e09b1cd5b493f577f5a89c4b4916c44"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a925ffae0caed4dff0e0bb9da0440e20a">refresh</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Refresh the widget. <a href="#a925ffae0caed4dff0e0bb9da0440e20a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a51279c7d091a0060bde4f26845202a33">setCurrentCell</a> (int row, int column)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Give a cell focus. <a href="#a51279c7d091a0060bde4f26845202a33"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#acedafc837958034d15616eb14992b374">currentRow</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the index of the row currently selected. <a href="#acedafc837958034d15616eb14992b374"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#ae19b1700dbf51bf26f06a14865b2486a">currentColumn</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the index of the column currently selected. <a href="#ae19b1700dbf51bf26f06a14865b2486a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const std::vector< int > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a0fb09470c5ee23ee95e07fdfda027590">selectedRows</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The list of rows that are currently selected. <a href="#a0fb09470c5ee23ee95e07fdfda027590"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a6988a1b768e8f0ec59b1a9ea06c6afd0">clearSelection</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Clear the current selection. <a href="#a6988a1b768e8f0ec59b1a9ea06c6afd0"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceWt.html#a74b3f7eb1689a3cbf0ea514ffd20bccc">SelectionMode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a630019b3fcfdfdb109cb9c89168b554c">selectionMode</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the current selection mode. <a href="#a630019b3fcfdfdb109cb9c89168b554c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#afd0f8697b8f4e3e0a63d6a3bb236e4da">setSelectionMode</a> (<a class="el" href="namespaceWt.html#a74b3f7eb1689a3cbf0ea514ffd20bccc">SelectionMode</a> mode)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the selection mode. <a href="#afd0f8697b8f4e3e0a63d6a3bb236e4da"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a2cccbab98d2639aea94a041bd144d3aa">setSelectionBehavior</a> (<a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13">SelectionBehavior</a> behavior)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the selection behaviour. <a href="#a2cccbab98d2639aea94a041bd144d3aa"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13">SelectionBehavior</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a4eece626861dd19a6b4ec903a46f5062">selectionBehavior</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the current selection behaviour. <a href="#a4eece626861dd19a6b4ec903a46f5062"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Signal.html">Signal</a>< int, int > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#abc2bed9a030c38f6545c904dd14872eb">cellClicked</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Signal emitted when a cell is clicked. <a href="#abc2bed9a030c38f6545c904dd14872eb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Signal.html">Signal</a>< int, int, int, int > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a95fc2f78d5f4d8f2befc3af41e777c3b">currentCellChanged</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Signal emitted when a new cell received focus. <a href="#a95fc2f78d5f4d8f2befc3af41e777c3b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Signal.html">Signal</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#ae35765d2483d419d5cb2df06247d44de">itemSelectionChanged</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Signal emitted when the selection changes. <a href="#ae35765d2483d419d5cb2df06247d44de"></a><br/></td></tr> <tr><td colspan="2"><h2><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1TableView.html#a4be5b4bb37a248e695a0b6398abb7e53">dateRenderer</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &format)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a date renderer for the given format. <a href="#a4be5b4bb37a248e695a0b6398abb7e53"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A widget that displays data in a table. </p> <p>This class is an MVC view widget, which works in conjunction with a <a class="el" href="classWt_1_1WAbstractItemModel.html" title="An abstract model for use with Wt's view classes.">WAbstractItemModel</a> for the data. The model may be set (and changed) using <a class="el" href="classWt_1_1Ext_1_1TableView.html#ae749720b6992ecf62a900bbc45a5607d" title="Specify the model.">setModel()</a>.</p> <p>The widget may be configured to allow the user to hide or resize columns, sort on column data, or reorder columns using drag&drop.</p> <p>By default, the table is not editable. Use <a class="el" href="classWt_1_1Ext_1_1TableView.html#a8fce08c9e2b06463377342e03f2970d2" title="Configure an editor for the given column.">setEditor()</a> to specify a form field that may be used for inline editing for a particular column. Changes are then reflected in the <a class="el" href="classWt_1_1Ext_1_1TableView.html#aa28bbad6fef68f903fed1aa01303c3ce" title="Return the model.">model()</a>.</p> <p>The table supports single and multiple selection modes, that work on a row-level, or cell-level. The latter option is enforced when the table is editable.</p> <p>By default, the data of the model is stored client-side, but this may be changed using <a class="el" href="classWt_1_1Ext_1_1TableView.html#a11f1507b4db23da74cf54741a4b40b00" title="Configure the location of the data.">setDataLocation()</a> to be server-side. The latter option allows, in conjunction with a paging tool bar (see <a class="el" href="classWt_1_1Ext_1_1TableView.html#a0e09b1cd5b493f577f5a89c4b4916c44" title="Create a paging tool bar.">createPagingToolBar()</a>) to support viewing (and editing) of large data sets.</p> <p>Although <a class="el" href="classWt_1_1Ext_1_1TableView.html" title="A widget that displays data in a table.">TableView</a> inherits from <a class="el" href="classWt_1_1Ext_1_1Container.html" title="A container class which manages its contents using layout managers.">Container</a> (through <a class="el" href="classWt_1_1Ext_1_1Panel.html" title="A container with a title and standard GUI elements.">Panel</a>), specifying a layout for adding or removing widgets is not supported. The <a class="el" href="classWt_1_1Ext_1_1Panel.html" title="A container with a title and standard GUI elements.">Panel</a> methods to specify tool bars, titles, and buttons are however supported.</p> <div class="image"> <img src="ExtTableView-1.png" alt="ExtTableView-1.png"/> <div class="caption"> Example of a TableView</div></div> <div class="image"> <img src="ExtTableView-2.png" alt="ExtTableView-2.png"/> <div class="caption"> Example of a editing in a TableView using a ComboBox</div></div> <h3>CSS</h3> <p>A <a class="el" href="classWt_1_1Ext_1_1TableView.html" title="A widget that displays data in a table.">TableView</a> has the <code>table.x-grid3-row-table</code> style classes. </p> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="af982555ad58c7e846dbe829f10a5e09b"></a><!-- doxytag: member="Wt::Ext::TableView::TableView" ref="af982555ad58c7e846dbe829f10a5e09b" args="(WContainerWidget *parent=0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Wt::Ext::TableView::TableView </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> * </td> <td class="paramname"><em>parent</em> = <code>0</code></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Create a new table view. </p> <p>You should specify a model using <a class="el" href="classWt_1_1Ext_1_1TableView.html#ae749720b6992ecf62a900bbc45a5607d" title="Specify the model.">setModel(WAbstractItemModel *)</a>. </p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a36e7290ea7fb21f7785ce4825e4c6222"></a><!-- doxytag: member="Wt::Ext::TableView::alternatingRowColors" ref="a36e7290ea7fb21f7785ce4825e4c6222" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Wt::Ext::TableView::alternatingRowColors </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return if rows are rendered with alternating colors. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#aeca778394c0c4165cb890624e7f26f68" title="Render rows with alternating colors.">setAlternatingRowColors(bool)</a> </dd></dl> </div> </div> <a class="anchor" id="abc2bed9a030c38f6545c904dd14872eb"></a><!-- doxytag: member="Wt::Ext::TableView::cellClicked" ref="abc2bed9a030c38f6545c904dd14872eb" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1Signal.html">Signal</a><int, int>& Wt::Ext::TableView::cellClicked </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Signal emitted when a cell is clicked. </p> <p>The signal arguments are row and column of the cell that is clicked.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#a95fc2f78d5f4d8f2befc3af41e777c3b" title="Signal emitted when a new cell received focus.">currentCellChanged()</a> </dd></dl> </div> </div> <a class="anchor" id="a6988a1b768e8f0ec59b1a9ea06c6afd0"></a><!-- doxytag: member="Wt::Ext::TableView::clearSelection" ref="a6988a1b768e8f0ec59b1a9ea06c6afd0" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::clearSelection </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Clear the current selection. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#a51279c7d091a0060bde4f26845202a33" title="Give a cell focus.">setCurrentCell(int, int)</a> </dd></dl> </div> </div> <a class="anchor" id="a44ad9387f03c949018642effbc444146"></a><!-- doxytag: member="Wt::Ext::TableView::columnAlignment" ref="a44ad9387f03c949018642effbc444146" args="(int column) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="namespaceWt.html#ab8f772c69bc8180c31f9e4f4593b143f">AlignmentFlag</a> Wt::Ext::TableView::columnAlignment </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return the horizontal content alignment of a column. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#ac4dfbc43791653d6aa4fa1e7517d7523" title="Set the horizontal content alignment of a column.">setColumnAlignment(int, AlignmentFlag)</a> </dd></dl> </div> </div> <a class="anchor" id="aab8ed89a0c658fffad2f3e4cb575450d"></a><!-- doxytag: member="Wt::Ext::TableView::columnsMovable" ref="aab8ed89a0c658fffad2f3e4cb575450d" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Wt::Ext::TableView::columnsMovable </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return if columns are movable. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#ad8527a57c1004097937befe83633d998" title="Allow the user to move columns using drag and drop.">setColumnsMovable(bool)</a> </dd></dl> </div> </div> <a class="anchor" id="ae3892620e188e2b95cec6af949fa3a07"></a><!-- doxytag: member="Wt::Ext::TableView::columnWidth" ref="ae3892620e188e2b95cec6af949fa3a07" args="(int column) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Wt::Ext::TableView::columnWidth </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return the column width. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#a0618d71520e5c0c5da46beb30100e634" title="Set the column width (in pixels) for a column.">setColumnWidth(int, int)</a> </dd></dl> </div> </div> <a class="anchor" id="a0e09b1cd5b493f577f5a89c4b4916c44"></a><!-- doxytag: member="Wt::Ext::TableView::createPagingToolBar" ref="a0e09b1cd5b493f577f5a89c4b4916c44" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1Ext_1_1ToolBar.html">ToolBar</a> * Wt::Ext::TableView::createPagingToolBar </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Create a paging tool bar. </p> <p>Create a toolbar that provides paging controls for this table. You should configure the page size using <a class="el" href="classWt_1_1Ext_1_1TableView.html#a9b8be64acea3d9df598fd418d0b0e55a" title="Configure a page size to browse the data page by page.">setPageSize(int)</a>.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#a9b8be64acea3d9df598fd418d0b0e55a" title="Configure a page size to browse the data page by page.">setPageSize(int)</a>, <a class="el" href="classWt_1_1Ext_1_1TableView.html#a11f1507b4db23da74cf54741a4b40b00" title="Configure the location of the data.">setDataLocation(DataLocation)</a> </dd> <dd> <a class="el" href="classWt_1_1Ext_1_1Panel.html#a9436b9da7ee336136027fe4914a5a381" title="Set a tool bar at the bottom of the panel.">setBottomToolBar(ToolBar *)</a>, <a class="el" href="classWt_1_1Ext_1_1Panel.html#a16b203f3b26cc5ffb82e036e6419e60f" title="Set a tool bar at the top of the panel.">setTopToolBar(ToolBar *)</a> </dd></dl> </div> </div> <a class="anchor" id="a95fc2f78d5f4d8f2befc3af41e777c3b"></a><!-- doxytag: member="Wt::Ext::TableView::currentCellChanged" ref="a95fc2f78d5f4d8f2befc3af41e777c3b" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1Signal.html">Signal</a><int, int, int, int>& Wt::Ext::TableView::currentCellChanged </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Signal emitted when a new cell received focus. </p> <p>This signal is only emitted when <a class="el" href="classWt_1_1Ext_1_1TableView.html#a4eece626861dd19a6b4ec903a46f5062" title="Return the current selection behaviour.">selectionBehavior()</a> is <a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13afcf79c96af1f3bd64b7b143fd1ec1126">SelectItems</a>. The four arguments are <em>row</em>, <em>column</em>, <em>prevrow</em>, <em>prevcolumn</em> which hold respectively the location of the new focussed cell, and the previously focussed cell.</p> <p>Values of -1 indicate 'no selection'. </p> </div> </div> <a class="anchor" id="ae19b1700dbf51bf26f06a14865b2486a"></a><!-- doxytag: member="Wt::Ext::TableView::currentColumn" ref="ae19b1700dbf51bf26f06a14865b2486a" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Wt::Ext::TableView::currentColumn </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return the index of the column currently selected. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#acedafc837958034d15616eb14992b374" title="Return the index of the row currently selected.">currentRow()</a>, <a class="el" href="classWt_1_1Ext_1_1TableView.html#a51279c7d091a0060bde4f26845202a33" title="Give a cell focus.">setCurrentCell(int, int)</a> </dd></dl> </div> </div> <a class="anchor" id="acedafc837958034d15616eb14992b374"></a><!-- doxytag: member="Wt::Ext::TableView::currentRow" ref="acedafc837958034d15616eb14992b374" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Wt::Ext::TableView::currentRow </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return the index of the row currently selected. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#ae19b1700dbf51bf26f06a14865b2486a" title="Return the index of the column currently selected.">currentColumn()</a>, <a class="el" href="classWt_1_1Ext_1_1TableView.html#a51279c7d091a0060bde4f26845202a33" title="Give a cell focus.">setCurrentCell(int, int)</a> </dd></dl> </div> </div> <a class="anchor" id="a4be5b4bb37a248e695a0b6398abb7e53"></a><!-- doxytag: member="Wt::Ext::TableView::dateRenderer" ref="a4be5b4bb37a248e695a0b6398abb7e53" args="(const WString &format)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Wt::Ext::TableView::dateRenderer </td> <td>(</td> <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td> <td class="paramname"><em>format</em></td><td>)</td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Create a date renderer for the given format. </p> <p>The result is a JavaScript function that renders <a class="el" href="classWt_1_1WDate.html" title="A value class that represents a date on the Gregorian calendar.">WDate</a> (or more precisely, Ext.Date) values according to the given format, for use in <a class="el" href="classWt_1_1Ext_1_1TableView.html#acd1c2e98bd5420e398053ab6b6d4e7f0" title="Configure a custom renderer for the given column.">setRenderer()</a></p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#acd1c2e98bd5420e398053ab6b6d4e7f0" title="Configure a custom renderer for the given column.">setRenderer()</a> </dd> <dd> <a class="el" href="classWt_1_1WDate.html#a2be436babc9c5cb836901f4b2805f7ff">WDate::toString(const WString& format) </a> </dd></dl> </div> </div> <a class="anchor" id="acc3f7c2dbae0a063eed5fad7892c77a2"></a><!-- doxytag: member="Wt::Ext::TableView::enableColumnHiding" ref="acc3f7c2dbae0a063eed5fad7892c77a2" args="(int column, bool enable)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::enableColumnHiding </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"><em>enable</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Allow a column to be hidden through its context menu. </p> <dl class="see"><dt><b>See also:</b></dt><dd>isColumnHidingEnabled(int) </dd></dl> </div> </div> <a class="anchor" id="a1c9f10b2affca162eca145d624d0f49e"></a><!-- doxytag: member="Wt::Ext::TableView::hideColumn" ref="a1c9f10b2affca162eca145d624d0f49e" args="(int column)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::hideColumn </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Hide a column. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#a6fba01c5bc5bf18b2d28a5ea394292b7" title="Show a column.">showColumn(int)</a>, <a class="el" href="classWt_1_1Ext_1_1TableView.html#ae6f70012b68f37b8acaa16042f805178" title="Change the visibility of a column.">setColumnHidden(int, bool)</a> </dd></dl> </div> </div> <a class="anchor" id="aee2e7e8094023cd8c001b01cf520d7d2"></a><!-- doxytag: member="Wt::Ext::TableView::isColumnHidden" ref="aee2e7e8094023cd8c001b01cf520d7d2" args="(int column) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Wt::Ext::TableView::isColumnHidden </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return if a column is hidden. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#ae6f70012b68f37b8acaa16042f805178" title="Change the visibility of a column.">setColumnHidden(int, bool)</a> </dd></dl> </div> </div> <a class="anchor" id="a5b6670edddd105298c67d37167d330fd"></a><!-- doxytag: member="Wt::Ext::TableView::isColumnHidingEnabled" ref="a5b6670edddd105298c67d37167d330fd" args="(int column) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Wt::Ext::TableView::isColumnHidingEnabled </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return if a column may be hidden through its context menu. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#acc3f7c2dbae0a063eed5fad7892c77a2" title="Allow a column to be hidden through its context menu.">enableColumnHiding(int, bool)</a> </dd></dl> </div> </div> <a class="anchor" id="a20d295f97b290e9afb4568e026e4c965"></a><!-- doxytag: member="Wt::Ext::TableView::isColumnSortable" ref="a20d295f97b290e9afb4568e026e4c965" args="(int column) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Wt::Ext::TableView::isColumnSortable </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return if a column is sortable. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#abb2e0f5c6576335c86141183a10029ec" title="Allow a column to be sorted by the user.">setColumnSortable(int, bool)</a> </dd></dl> </div> </div> <a class="anchor" id="ae35765d2483d419d5cb2df06247d44de"></a><!-- doxytag: member="Wt::Ext::TableView::itemSelectionChanged" ref="ae35765d2483d419d5cb2df06247d44de" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1Signal.html">Signal</a>& Wt::Ext::TableView::itemSelectionChanged </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Signal emitted when the selection changes. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#acedafc837958034d15616eb14992b374" title="Return the index of the row currently selected.">currentRow()</a>, <a class="el" href="classWt_1_1Ext_1_1TableView.html#ae19b1700dbf51bf26f06a14865b2486a" title="Return the index of the column currently selected.">currentColumn()</a> when <a class="el" href="classWt_1_1Ext_1_1TableView.html#a4eece626861dd19a6b4ec903a46f5062" title="Return the current selection behaviour.">selectionBehavior()</a> is <a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13afcf79c96af1f3bd64b7b143fd1ec1126">SelectItems</a> </dd> <dd> <a class="el" href="classWt_1_1Ext_1_1TableView.html#a0fb09470c5ee23ee95e07fdfda027590" title="The list of rows that are currently selected.">selectedRows()</a> when <a class="el" href="classWt_1_1Ext_1_1TableView.html#a4eece626861dd19a6b4ec903a46f5062" title="Return the current selection behaviour.">selectionBehavior()</a> is <a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13af392e7f86ea1d0807e54de5739011239">SelectRows</a>. </dd></dl> </div> </div> <a class="anchor" id="aa28bbad6fef68f903fed1aa01303c3ce"></a><!-- doxytag: member="Wt::Ext::TableView::model" ref="aa28bbad6fef68f903fed1aa01303c3ce" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a>* Wt::Ext::TableView::model </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return the model. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#ae749720b6992ecf62a900bbc45a5607d" title="Specify the model.">setModel(WAbstractItemModel *)</a> </dd></dl> </div> </div> <a class="anchor" id="a71bcd2818831c21a68202fe4e53552ab"></a><!-- doxytag: member="Wt::Ext::TableView::pageSize" ref="a71bcd2818831c21a68202fe4e53552ab" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Wt::Ext::TableView::pageSize </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return the page size. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#a9b8be64acea3d9df598fd418d0b0e55a" title="Configure a page size to browse the data page by page.">setPageSize(int)</a> </dd></dl> </div> </div> <a class="anchor" id="a925ffae0caed4dff0e0bb9da0440e20a"></a><!-- doxytag: member="Wt::Ext::TableView::refresh" ref="a925ffae0caed4dff0e0bb9da0440e20a" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::refresh </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Refresh the widget. </p> <p>The refresh method is invoked when the locale is changed using <a class="el" href="classWt_1_1WApplication.html#a5c9cc1350019d69f154a2b44cdaf2596" title="Changes the locale.">WApplication::setLocale()</a> or when the user hit the refresh button.</p> <p>The widget must actualize its contents in response. </p> <p>Reimplemented from <a class="el" href="classWt_1_1Ext_1_1Panel.html#a960a266d0c5427a2786cc45a4b05ffa1">Wt::Ext::Panel</a>.</p> </div> </div> <a class="anchor" id="a300cede33cdf30af4f7543de794e72f2"></a><!-- doxytag: member="Wt::Ext::TableView::resizeColumnsToContents" ref="a300cede33cdf30af4f7543de794e72f2" args="(bool onResize=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::resizeColumnsToContents </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"><em>onResize</em> = <code>false</code></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Let the table view resize columns to fit their contents. </p> <p>By default, columns are sized using the column sizes that are provided. Using this method, this is changed to let columns expand to fit the entire table. By setting <em>onResize</em>, this is done also whenever the entire table or one of the columns is resized. </p> </div> </div> <a class="anchor" id="a0fb09470c5ee23ee95e07fdfda027590"></a><!-- doxytag: member="Wt::Ext::TableView::selectedRows" ref="a0fb09470c5ee23ee95e07fdfda027590" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const std::vector<int>& Wt::Ext::TableView::selectedRows </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>The list of rows that are currently selected. </p> <p>This is the way to retrieve the list of currently selected rows when <a class="el" href="classWt_1_1Ext_1_1TableView.html#a4eece626861dd19a6b4ec903a46f5062" title="Return the current selection behaviour.">selectionBehavior()</a> is <a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13af392e7f86ea1d0807e54de5739011239">SelectRows</a>. This list is always empty when <a class="el" href="classWt_1_1Ext_1_1TableView.html#a4eece626861dd19a6b4ec903a46f5062" title="Return the current selection behaviour.">selectionBehavior()</a> is <a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13afcf79c96af1f3bd64b7b143fd1ec1126">SelectItems</a> and you should use <a class="el" href="classWt_1_1Ext_1_1TableView.html#acedafc837958034d15616eb14992b374" title="Return the index of the row currently selected.">currentRow()</a> and <a class="el" href="classWt_1_1Ext_1_1TableView.html#ae19b1700dbf51bf26f06a14865b2486a" title="Return the index of the column currently selected.">currentColumn()</a> instead. </p> </div> </div> <a class="anchor" id="a4eece626861dd19a6b4ec903a46f5062"></a><!-- doxytag: member="Wt::Ext::TableView::selectionBehavior" ref="a4eece626861dd19a6b4ec903a46f5062" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13">SelectionBehavior</a> Wt::Ext::TableView::selectionBehavior </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return the current selection behaviour. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#a4eece626861dd19a6b4ec903a46f5062" title="Return the current selection behaviour.">selectionBehavior()</a> </dd></dl> </div> </div> <a class="anchor" id="a630019b3fcfdfdb109cb9c89168b554c"></a><!-- doxytag: member="Wt::Ext::TableView::selectionMode" ref="a630019b3fcfdfdb109cb9c89168b554c" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="namespaceWt.html#a74b3f7eb1689a3cbf0ea514ffd20bccc">SelectionMode</a> Wt::Ext::TableView::selectionMode </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return the current selection mode. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#afd0f8697b8f4e3e0a63d6a3bb236e4da" title="Set the selection mode.">setSelectionMode(SelectionMode)</a> </dd></dl> </div> </div> <a class="anchor" id="aeca778394c0c4165cb890624e7f26f68"></a><!-- doxytag: member="Wt::Ext::TableView::setAlternatingRowColors" ref="aeca778394c0c4165cb890624e7f26f68" args="(bool enable)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setAlternatingRowColors </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"><em>enable</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p><a class="el" href="namespaceWt_1_1Render.html" title="Namespace for the XHTML Rendering (Wt::Render).">Render</a> rows with alternating colors. </p> <p>By defaults, all rows are rendered using the same color.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#a36e7290ea7fb21f7785ce4825e4c6222" title="Return if rows are rendered with alternating colors.">alternatingRowColors()</a> </dd></dl> </div> </div> <a class="anchor" id="a88f1de406a741b47533311d249a168dc"></a><!-- doxytag: member="Wt::Ext::TableView::setAutoExpandColumn" ref="a88f1de406a741b47533311d249a168dc" args="(int column, int minWidth=50, int maxWidth=1000)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setAutoExpandColumn </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>minWidth</em> = <code>50</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>maxWidth</em> = <code>1000</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the column which will auto-expand to take the remaining space. </p> <p>By default the last column will do that. </p> </div> </div> <a class="anchor" id="ac4dfbc43791653d6aa4fa1e7517d7523"></a><!-- doxytag: member="Wt::Ext::TableView::setColumnAlignment" ref="ac4dfbc43791653d6aa4fa1e7517d7523" args="(int column, AlignmentFlag alignment)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setColumnAlignment </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="namespaceWt.html#ab8f772c69bc8180c31f9e4f4593b143f">AlignmentFlag</a> </td> <td class="paramname"><em>alignment</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the horizontal content alignment of a column. </p> <p>The default value is <a class="el" href="namespaceWt.html#ab8f772c69bc8180c31f9e4f4593b143fad033ef69b45d0b75633be34168c9b606">AlignLeft</a>. The alignment parameter is a horizontal alignment flag. </p> </div> </div> <a class="anchor" id="ae6f70012b68f37b8acaa16042f805178"></a><!-- doxytag: member="Wt::Ext::TableView::setColumnHidden" ref="ae6f70012b68f37b8acaa16042f805178" args="(int column, bool hide)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setColumnHidden </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"><em>hide</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Change the visibility of a column. </p> <dl class="see"><dt><b>See also:</b></dt><dd>isColumnHidden(int), <a class="el" href="classWt_1_1Ext_1_1TableView.html#acc3f7c2dbae0a063eed5fad7892c77a2" title="Allow a column to be hidden through its context menu.">enableColumnHiding(int, bool)</a> </dd></dl> </div> </div> <a class="anchor" id="ad8527a57c1004097937befe83633d998"></a><!-- doxytag: member="Wt::Ext::TableView::setColumnsMovable" ref="ad8527a57c1004097937befe83633d998" args="(bool movable)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setColumnsMovable </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"><em>movable</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Allow the user to move columns using drag and drop. </p> <p>Setting movable to true, enables the user to move columns around by drag and drop.</p> <p><em>Note: this currently breaks the CellSelection mode to record the view column number, but not the data column number.</em></p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#aab8ed89a0c658fffad2f3e4cb575450d" title="Return if columns are movable.">columnsMovable()</a> </dd></dl> </div> </div> <a class="anchor" id="abb2e0f5c6576335c86141183a10029ec"></a><!-- doxytag: member="Wt::Ext::TableView::setColumnSortable" ref="abb2e0f5c6576335c86141183a10029ec" args="(int column, bool sortable)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setColumnSortable </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"><em>sortable</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Allow a column to be sorted by the user. </p> <dl class="see"><dt><b>See also:</b></dt><dd>isColumnSortable(int) </dd></dl> </div> </div> <a class="anchor" id="a0618d71520e5c0c5da46beb30100e634"></a><!-- doxytag: member="Wt::Ext::TableView::setColumnWidth" ref="a0618d71520e5c0c5da46beb30100e634" args="(int column, int pixels)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setColumnWidth </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>pixels</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the column width (in pixels) for a column. </p> <dl class="see"><dt><b>See also:</b></dt><dd>columnWidth(int) </dd></dl> </div> </div> <a class="anchor" id="a51279c7d091a0060bde4f26845202a33"></a><!-- doxytag: member="Wt::Ext::TableView::setCurrentCell" ref="a51279c7d091a0060bde4f26845202a33" args="(int row, int column)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setCurrentCell </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>row</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>column</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Give a cell focus. </p> <p>When <a class="el" href="classWt_1_1Ext_1_1TableView.html#a4eece626861dd19a6b4ec903a46f5062" title="Return the current selection behaviour.">selectionBehavior()</a> is <a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13af392e7f86ea1d0807e54de5739011239">SelectRows</a>, only the <em>row</em> argument is used, and the effect is to select a particular row.</p> <p>Even when <a class="el" href="classWt_1_1Ext_1_1TableView.html#a630019b3fcfdfdb109cb9c89168b554c" title="Return the current selection mode.">selectionMode()</a> is <a class="el" href="namespaceWt.html#a74b3f7eb1689a3cbf0ea514ffd20bccca7784d55577e92022399052c3d4d69954">ExtendedSelection</a>, this method will first clear selection, and the result is that the given <em>row</em>,<em>column</em> will be the only selected cell.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#acedafc837958034d15616eb14992b374" title="Return the index of the row currently selected.">currentRow()</a>, <a class="el" href="classWt_1_1Ext_1_1TableView.html#ae19b1700dbf51bf26f06a14865b2486a" title="Return the index of the column currently selected.">currentColumn()</a>, <a class="el" href="classWt_1_1Ext_1_1TableView.html#a95fc2f78d5f4d8f2befc3af41e777c3b" title="Signal emitted when a new cell received focus.">currentCellChanged()</a> signal </dd> <dd> <a class="el" href="classWt_1_1Ext_1_1TableView.html#afd0f8697b8f4e3e0a63d6a3bb236e4da" title="Set the selection mode.">setSelectionMode(SelectionMode)</a>, <a class="el" href="classWt_1_1Ext_1_1TableView.html#a2cccbab98d2639aea94a041bd144d3aa" title="Set the selection behaviour.">setSelectionBehavior(SelectionBehavior)</a> </dd></dl> </div> </div> <a class="anchor" id="a11f1507b4db23da74cf54741a4b40b00"></a><!-- doxytag: member="Wt::Ext::TableView::setDataLocation" ref="a11f1507b4db23da74cf54741a4b40b00" args="(DataLocation dataLocation)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setDataLocation </td> <td>(</td> <td class="paramtype"><a class="el" href="group__ext.html#ga5bc908c6e6aa90646cca1276d68cb2b2">DataLocation</a> </td> <td class="paramname"><em>dataLocation</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Configure the location of the data. </p> <p>By default, data is stored at the client, and therefore entirely transmitted when rendering the table for the first time. Alternatively, the data may be kept at the server. Unless a paging tool bar is configured however, this will still cause the entire table to be anyway, after the table is rendered. When a paging tool bar is configured, only a single page of data is displayed, and transmitted, giving the best performance for big data sets.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#a0e09b1cd5b493f577f5a89c4b4916c44" title="Create a paging tool bar.">createPagingToolBar()</a> </dd></dl> </div> </div> <a class="anchor" id="a8fce08c9e2b06463377342e03f2970d2"></a><!-- doxytag: member="Wt::Ext::TableView::setEditor" ref="a8fce08c9e2b06463377342e03f2970d2" args="(int column, FormField *editor)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setEditor </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classWt_1_1Ext_1_1FormField.html">FormField</a> * </td> <td class="paramname"><em>editor</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Configure an editor for the given column. </p> <p>Sets an inline editor that will be used to edit values in this column. The edited value will be reflected in the data model.</p> <p>When configuring an editor, the selectionBehaviour() is set to <a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13afcf79c96af1f3bd64b7b143fd1ec1126">SelectItems</a> mode.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1LineEdit.html" title="A line edit.">LineEdit</a>, <a class="el" href="classWt_1_1Ext_1_1NumberField.html" title="A form field for editing a number.">NumberField</a>, <a class="el" href="classWt_1_1Ext_1_1DateField.html" title="A form field for conveniently editing a date using a calendar popup.">DateField</a>, <a class="el" href="classWt_1_1Ext_1_1ComboBox.html" title="A widget that provides a drop-down combo-box control.">ComboBox</a> </dd></dl> </div> </div> <a class="anchor" id="a82aa7b9fd7931c064a85624167777dde"></a><!-- doxytag: member="Wt::Ext::TableView::setHighlightMouseOver" ref="a82aa7b9fd7931c064a85624167777dde" args="(bool highlight)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setHighlightMouseOver </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"><em>highlight</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Configure if the row under the mouse will be highlighted. </p> <p>By default, the row under the mouse is not highlighted.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#abbf14ebf04eba309570653f22a6ff22e" title="Return if the row under the mouse will be highlighted.">highlightMouseOver()</a> </dd></dl> </div> </div> <a class="anchor" id="ae749720b6992ecf62a900bbc45a5607d"></a><!-- doxytag: member="Wt::Ext::TableView::setModel" ref="ae749720b6992ecf62a900bbc45a5607d" args="(WAbstractItemModel *model)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setModel </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a> * </td> <td class="paramname"><em>model</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Specify the model. </p> <p>You can change the model at any time, with the contraint that you should keep the same column configuration.</p> <p>You may also reset the same model. This will result in retransmission of the model from scratch. In some cases, this could result in a higher preformance when you have removed many rows or modified a lot of data. </p> </div> </div> <a class="anchor" id="a9b8be64acea3d9df598fd418d0b0e55a"></a><!-- doxytag: member="Wt::Ext::TableView::setPageSize" ref="a9b8be64acea3d9df598fd418d0b0e55a" args="(int pageSize)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setPageSize </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>pageSize</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Configure a page size to browse the data page by page. </p> <p>By setting a <em>pageSize</em> that is different from -1, the table view will display only single pages of the whole data set. You should probably add a paging tool bar to allow the user to scroll through the pages.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#a71bcd2818831c21a68202fe4e53552ab" title="Return the page size.">pageSize()</a>, <a class="el" href="classWt_1_1Ext_1_1TableView.html#a0e09b1cd5b493f577f5a89c4b4916c44" title="Create a paging tool bar.">createPagingToolBar()</a> </dd></dl> </div> </div> <a class="anchor" id="acd1c2e98bd5420e398053ab6b6d4e7f0"></a><!-- doxytag: member="Wt::Ext::TableView::setRenderer" ref="acd1c2e98bd5420e398053ab6b6d4e7f0" args="(int column, const std::string &rendererJS)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setRenderer </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"><em>rendererJS</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Configure a custom renderer for the given column. </p> <p>Sets a JavaScript function to render values in the given column. The JavaScript function takes one argument (the value), which has a type that corresponds to the C++ type: </p> <table class="doxtable"> <tr> <td><b>C++ type</b></td><td><b>JavaScript type</b> </td></tr> <tr> <td><a class="el" href="classWt_1_1WString.html" title="A value class which describes a locale-aware unicode string.">WString</a></td><td>string </td></tr> <tr> <td><a class="el" href="classWt_1_1WDate.html" title="A value class that represents a date on the Gregorian calendar.">WDate</a></td><td>Ext.Date </td></tr> <tr> <td><em>number</em> type</td><td>number </td></tr> </table> <p>An example of rendererJS for numerical data, which renders positive values in green and negative values in red could be: </p> <div class="fragment"><pre class="fragment"> <span class="keyword">function</span> change(val) { <span class="keywordflow">if</span> (val > 0){ <span class="keywordflow">return</span> <span class="stringliteral">'<span style="color:green;">'</span> + val + <span class="stringliteral">'</span>'</span>; } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(val < 0) { <span class="keywordflow">return</span> <span class="stringliteral">'<span style="color:red;">'</span> + val + <span class="stringliteral">'</span>'</span>; } <span class="keywordflow">return</span> val; } </pre></div><dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#a4be5b4bb37a248e695a0b6398abb7e53" title="Create a date renderer for the given format.">dateRenderer()</a> </dd></dl> </div> </div> <a class="anchor" id="a2cccbab98d2639aea94a041bd144d3aa"></a><!-- doxytag: member="Wt::Ext::TableView::setSelectionBehavior" ref="a2cccbab98d2639aea94a041bd144d3aa" args="(SelectionBehavior behavior)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setSelectionBehavior </td> <td>(</td> <td class="paramtype"><a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13">SelectionBehavior</a> </td> <td class="paramname"><em>behavior</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the selection behaviour. </p> <p>The selection behavior defines the unit of selection. The selection behavior also determines the set of methods that must be used to inspect the current selection.</p> <p>You may either:</p> <ul> <li>use <a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13af392e7f86ea1d0807e54de5739011239">SelectRows</a> to only select whole rows, and use the method <a class="el" href="classWt_1_1Ext_1_1TableView.html#a0fb09470c5ee23ee95e07fdfda027590" title="The list of rows that are currently selected.">selectedRows()</a> to inspect the current selection.</li> <li>or use <a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13afcf79c96af1f3bd64b7b143fd1ec1126">SelectItems</a> to select (a single) individual item, and use the methods <a class="el" href="classWt_1_1Ext_1_1TableView.html#ae19b1700dbf51bf26f06a14865b2486a" title="Return the index of the column currently selected.">currentColumn()</a>, <a class="el" href="classWt_1_1Ext_1_1TableView.html#acedafc837958034d15616eb14992b374" title="Return the index of the row currently selected.">currentRow()</a>, <a class="el" href="classWt_1_1Ext_1_1TableView.html#a51279c7d091a0060bde4f26845202a33" title="Give a cell focus.">setCurrentCell()</a> to inspect and modify the current selection. </li> </ul> </div> </div> <a class="anchor" id="afd0f8697b8f4e3e0a63d6a3bb236e4da"></a><!-- doxytag: member="Wt::Ext::TableView::setSelectionMode" ref="afd0f8697b8f4e3e0a63d6a3bb236e4da" args="(SelectionMode mode)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::setSelectionMode </td> <td>(</td> <td class="paramtype"><a class="el" href="namespaceWt.html#a74b3f7eb1689a3cbf0ea514ffd20bccc">SelectionMode</a> </td> <td class="paramname"><em>mode</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the selection mode. </p> <p>The selection mode determines if no, only one, or multiple items may be selected.</p> <p><em>When <a class="el" href="classWt_1_1Ext_1_1TableView.html#a4eece626861dd19a6b4ec903a46f5062" title="Return the current selection behaviour.">selectionBehavior()</a> is <a class="el" href="namespaceWt.html#a04aecd34ae0810219e82208a9890de13afcf79c96af1f3bd64b7b143fd1ec1126">SelectItems</a>, <a class="el" href="namespaceWt.html#a74b3f7eb1689a3cbf0ea514ffd20bccca7784d55577e92022399052c3d4d69954">ExtendedSelection</a> is not supported.</em> </p> </div> </div> <a class="anchor" id="a6fba01c5bc5bf18b2d28a5ea394292b7"></a><!-- doxytag: member="Wt::Ext::TableView::showColumn" ref="a6fba01c5bc5bf18b2d28a5ea394292b7" args="(int column)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::TableView::showColumn </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Show a column. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1TableView.html#a1c9f10b2affca162eca145d624d0f49e" title="Hide a column.">hideColumn(int)</a>, <a class="el" href="classWt_1_1Ext_1_1TableView.html#ae6f70012b68f37b8acaa16042f805178" title="Change the visibility of a column.">setColumnHidden(int, bool)</a> </dd></dl> </div> </div> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr size="1"><address style="text-align: right; margin: 3px"><small> Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the C++ Web Toolkit (Wt)</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" border="0" style="vertical-align: middle; display: inline-block; height: 2em"></a> 1.7.5.1</small></address> </body> </html>