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
0 answers

how to use akaunting / laravel-money helper function in blade html js script - Laravel

I'm attempting to convert the country code to the symbol for this I have used the below package. Currency formatting and conversion package for Laravel akaunting / laravel-money - (https://github.com/akaunting/laravel-money/blob/master/README.md) I…
Marty
  • 302
  • 4
  • 18
3
votes
1 answer

Jquery datatable add rows

I have a datatable in my page initiated like below: var dataSet = [ { "id": 1, "name": "Bennett Weimann", "email": "jtremblay@example.com" }, { "id": 2, "name": "Bennett Weimann", "email": "buckridge.orin@example.com"…
3
votes
3 answers

Speed up setdiff(), intersect(), union() operations on vectors in R

I have a data table dt1: id1 id2 V1 V2 1 a c(1, 2, 3, 4) c(1, 3, 6) 2 b c(2, 6, 9, 8) c(8, 5) I want to add new columns which are the result of the setdiff(), intersect() and union() operations on the V1 and V2 variables. Expected…
red_quark
  • 971
  • 5
  • 20
3
votes
1 answer

Why does Invoke-Sqlcmd -OutputAs DataTables return different types for one vs many records

PowerShell 5.1 $tblOutput = Invoke-Sqlcmd ... -OutputAs DataTables Why does Invoke-Sqlcmd return a DataRow type when 1 record is return from database vs DataTable when greater than 1? I would have expected that it returns DataTable…
Rod
  • 14,529
  • 31
  • 118
  • 230
3
votes
1 answer

Tailwind CSS: Fixed First column and other colums scrollable horizontally

I want the first column in my data table to be fixed whereas other columns can be scrollable horizontally exactly like in the link. https://css-tricks.com/wp-content/uploads/2021/02/CleanShot-2021-02-02-at-08.28.56.mp4 how can I do it in tailwind…
3
votes
1 answer

Combining selectInput and DT::datatable editing in Shiny

I would like to update both a data.frame and a DT::datatable interactively when editing the datatable cells. This works fine but when I use the selectInput function to filter the data.frame and edit cells in another row of the datatable, it just…
Gion Mors
  • 313
  • 1
  • 3
  • 20
3
votes
3 answers

Counting values based on certain conditions in R?

I have a dataset and I'm trying to count the number of codes each patient has, as well as the number of codes of interest that each patient has. Let's say that I have this table below and my code of interest is 26. patient code 1 25 1 …
Emma N
  • 129
  • 6
3
votes
4 answers

IEnumerable as DataTable performance issue

I have the following extension, which generates a DataTable from an IEnumerable: public static DataTable AsDataTable(this IEnumerable enumerable) { DataTable table = new DataTable(); T first =…
Kjetil
  • 484
  • 4
  • 15
3
votes
0 answers

Rider debug visualizer for datatable like in visual studio as a table

I looked and looked and could not find an answer to this. With Rider, when debugging, how can you display a datatable as a table like in Visual Studio? Like in VS when you hover over a datatable, it displays it as a table with all columns and…
3
votes
1 answer

same table data rowspan html css

i got stuck when im try to build a table with data like this export const arr = [ {no : '1', name: 'george', fruit: 'orange'}, {no : '2', name: 'jason', fruit: 'orange'}, {no : '3', name: 'david', fruit: 'apple'},] i want to rowspan when the data…
Dicka Reynaldi
  • 329
  • 2
  • 11
3
votes
1 answer

Rmarkdown: Datatable conflicts with jquery

I would like to use a live timestamp in my rmarkdown file. To do so, I need to include the jquery and moment.js libraries. However, the jquery library conflicts with the datatable R library. I tried many solutions I saw online, without success. This…
mat
  • 2,412
  • 5
  • 31
  • 69
3
votes
2 answers

R - Set values by group based on a condition in a dataframe

I have the following dataset. group value row_name overlaps group_a 4 1 2 group_a 5 2 3, 5 group_a 48 3 4, 5 group_a 54 4 5 group_a 12 5 group_b 12 6 7 group_b 1 7 The overlaps column indicates which rows have a certain…
Quizicall
  • 133
  • 6
3
votes
2 answers

Looking up a value in another datatable when creating a report viewer report

I have a local report that I created in my application. It displays the contents of a table in my access database called "History". One of the columns is "ID" and it refers to the primary key in another table "Employees". My report shows the…
ChrisO
  • 5,068
  • 1
  • 34
  • 47
3
votes
1 answer

Fetch one record from relationship for Datatable

I'm using Laravel v8 I have 3 models as:Family, FamilyMember, FamilyRelationship Family table: id address created_at updated_at 1 test NULL NULL Family Relationship…
Nausif
  • 400
  • 1
  • 6
  • 17
3
votes
4 answers

React - How to change the language of DataTable component properties of material ui?

I'm using a Material ui component called DataTable, the problem is that filter fields are in English and I was wondering if there is any way to change their language to Portuguese below my component code: import * as React from 'react'; import {…
Ruben Martins
  • 161
  • 2
  • 5
  • 14