Questions tagged [datatable]

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)

22197 questions
3
votes
3 answers

DataTable memory leak

following piece of code is leaking memory even if no data is returned by database. could anyone shed some light on this. .net profiler application shows that the culprit is datatable using (OleDbDataAdapter da = new OleDbDataAdapter("select * from…
Mubashir Khan
  • 1,464
  • 1
  • 12
  • 17
3
votes
2 answers

Filtering DataTable in VB.Net

I am having a datatable with following structure. mid mname version baseID ------------------------------------ 1 tag3 1 1 2 tag3 2 1 3 tag3 3 1 4 tag5 1 4 5 …
Coderr
  • 67
  • 3
  • 8
3
votes
1 answer

Testing with Jest React Mui table pagination

I have basic MUI data table with pagination https://mui.com/material-ui/react-table/. I used it in NEXT page. When I want to test in Jest changing page rows number range from 5 to 10 clicking change range button don't show pop up menu. Table footer…
DaReign
  • 51
  • 3
3
votes
1 answer

Programatically generate tabset panels of datatables in Quarto

This question is similar, but not identical to this one. Basically, I have a number of tables that I would like to show in tabsets using DT::datatable(). Unfortunately, I can't figure out how. The following code works, but I need to manually type…
January
  • 16,320
  • 6
  • 52
  • 74
3
votes
1 answer

Jquery Table Data not showing properly on html

I try to showing data with jquery data table but the result is no value at all (only showing header) Here's my view script @model IEnumerable

@Html.ActionLink("Create New", "Create")

ashblossom
  • 567
  • 4
  • 17
3
votes
1 answer

DataTables warning - Incorrect column count

I am coding in asp.net mvc and I am trying to implement the table of DataTables.net but I get this error: DataTables warning: table id=abc - Incorrect column count. For more information about this error, please see http://datatables.net/tn/18 This…
young gnup
  • 35
  • 1
  • 3
3
votes
2 answers

Create an empty table in MATLAB

When I am trying to create a table using the following code: sz = [4 3]; varTypes = ["double","datetime","string"]; varNames = ["Temperature","Time","Station"]; temps = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames) I get: Error…
HforHisham
  • 1,914
  • 1
  • 22
  • 34
3
votes
0 answers

dataTable - get the new object instead of the old object - RowEditEvent, primefaces

public void onEditRow(RowEditEvent event) { // old object (Cast) event.getObject(); How to get the values for the new object?
Marcelo Araujo
  • 145
  • 3
  • 13
3
votes
0 answers

PrimeReact DataTable custom filterFunction does nothing

We're using PrimeReact in our latest project, and we have a filter we want to implemented where the column data is an array and we want the user to be able to select an array of options to filter that column by. (So the column represents assigned…
3
votes
2 answers

How to sum two categories in panel-data using data.table

I'm having the particular case in R where two categories are displayed in a yearly panel data but do not correspond to the level I am using, this is, there are two cities that belong to the same state (A) but are on their individual city levels (a…
3
votes
1 answer

CsvHelper Load DataTable from File with No Header Not Working

I have some simple code that will load a DataTable from a .csv file if it includes a header. Now I need to load a DataTable from a file without a header. I was expecting to set HasHeaderRecord = false and the DataTable would be created with default…
RugbyDev
  • 33
  • 3
3
votes
1 answer

Tabsets not rendering datatables properly for Quarto Revealjs presentation

I am making a presentation in Quarto using Revealjs. I would like each slide to contain a panel-tabset with multiple tabs, each containing a datatable. When I view the rendered HTML document, several of the datatables fail to load. Specifically, the…
Escotch
  • 131
  • 1
  • 7
3
votes
1 answer

Filter DataTable Bokeh

I have a minimal sample below to support my question. I have a collection of dataframes in a dictionary that I used to generate DataTable(s) and storage them in an array with the def fDP, then storage in dictionaries the panels and tabs in order to…
ReinholdN
  • 526
  • 5
  • 22
3
votes
2 answers

Sorting a Gridview using Datatable

I have a gridview which I want to sort when any of its column header is clicked. There is a DataTable that is built on runtime and assigned to the gridview to populate data. Here is the DataTable and Gridview: DataTable dtMedication = new…
asma
  • 2,795
  • 13
  • 60
  • 87
3
votes
3 answers

Sorting a ADO.NET Datatable

I have a datatable in C#. DataTable dtClientMedications = new…
asma
  • 2,795
  • 13
  • 60
  • 87