Top "Datatable" questions

The term "datatable" is ambiguous.

LINQ query on a DataTable

I'm trying to perform a LINQ query on a DataTable object and bizarrely I am finding that performing such queries …

c# .net linq datatable .net-3.5
How to create a DataTable in C# and how to add rows?

How do create a DataTable in C#? I did like this: DataTable dt = new DataTable(); dt.clear(); dt.Columns.Add("…

c# ado.net datatable
How to select distinct rows in a datatable and store into an array

I have a dataset objds. objds contains a table named Table1. Table1 contains column named ProcessName. This ProcessName contains repeated …

c# select datatable distinct
How do you convert a DataTable into a generic list?

Currently, I'm using: DataTable dt = CreateDataTableInSomeWay(); List<DataRow> list = new List<DataRow>(); foreach (DataRow dr in …

c# generics datatable
Sorting rows in a data table

We have two columns in a DataTable, like so: COL1 COL2 Abc 5 Def 8 Ghi 3 We're trying to sort this datatable …

c# sorting datatable
How to export DataTable to Excel

How can I export a DataTable to Excel in C#? I am using Windows Forms. The DataTable is associated with …

c# excel datatable
Convert generic List/Enumerable to DataTable?

I have few methods that returns different Generic Lists. Exists in .net any class static method or whatever to convert …

c# list generics datatable
Datatable select with multiple conditions

I have a datatable with 4 columns A, B, C and D such that a particular combination of values for column …

c# select datatable
How to read a CSV file into a .NET Datatable

How can I load a CSV file into a System.Data.DataTable, creating the datatable based on the CSV file? …

c# .net csv datatable
Read SQL Table into C# DataTable

I've read a lot of posts about inserting a DataTable into a SQL table, but is there an easy way …

c# .net asp.net sql datatable