The term "datatable" is ambiguous. In .NET, it's a class that represents a table of in-memory data. In component based MVC frameworks like JSF and Wicket, it's an UI component that dynamically renders a HTML table based on a collection. For jQuery DataTables plugin, please use the [datatables] tag, for the data.table R package please use [data.table]. For the Python datatable package, use [py-datatable].
DataTable in .NET
A DataTable is a .NET class that represents one table of in-memory data. Unlike other programming languages and platforms, a .NET DataTable is not a GUI control but rather a representation of a SQL table directly accessible in code and a source of data for other controls.
A DataTable
may exist as part of a DataSet
, which represents an in-memory relational data store. In that context, they can be connected through instances of the DataRelation
class, and constrained by ForeignKeyConstraint
or UniqueConstraint
instances.
A DataTable
has a set of DataColumn
instances, which describe its schema. Data is stored in DataRow
instances.
A DataTable
may be sorted and filtered without changing the data by attaching it to a DataView
. The sorted and filtered rows are then accessed as instances of the DataRowView
class.
DataTable in JSF
A <h:dataTable>
is an UI component which allows you to render a HTML table dynamically based on a given List<Entity>
. You can specify columns using <h:column>
. Assuming that Entity
is a fullworthy javabean with 3 properties id
, name
and value
, here's an example how you can render a dynamically sized HTML table out of it:
<h:dataTable value="#{bean.entities}" var="entity">
<h:column>#{entity.id}</h:column>
<h:column>#{entity.name}</h:column>
<h:column>#{entity.value}</h:column>
</h:column>
DataTable in Wicket
A data table builds on data grid view to introduce toolbars. Toolbars can be used to display sortable column headers, paging information, filter controls, and other information.
Data table also provides its own markup for an html table so the user does not need to provide it himself. This makes it very simple to add a datatable to the markup, however, some flexibility. (from Wicket 1.4.18 Javadoc)