Top "Datatable" questions

The term "datatable" is ambiguous.

How to change the DataTable Column Name?

I have one DataTable which has four columns such as StudentID CourseID SubjectCode Marks ------------ ---------- ------------- -------- 1 100 MT400 80 2 100 MT400 79 3 100 …

c# asp.net ado.net datatable
How to check if a column exists in a datatable

I have a datable generated with the content of a csv file. I use other information to map some column …

c# datatable argumentexception
Get all column names of a DataTable into string array using (LINQ/Predicate)

I know we can easily do this by a simple loop, but I want to persue this LINQ/Predicate? string[] …

c# .net linq datatable
How to add new DataRow into DataTable?

I have a DataGridView binded to a DataTable (DataTable binded to database). I need to add a DataRow to the …

c# datagridview datatable datarow
How to select min and max values of a column in a datatable?

For the following datatable column, what is the fastest way to get the min and max values? AccountLevel 0 1 2 3

c# .net select datatable
Find row in datatable with specific id

I have two columns in a datatable: ID, Calls. How do I find what the value of Calls is where …

c# datatable datarow
How do you Sort a DataTable given column and direction?

I need to resort, in memory, a DataTable based on a column and direction that are coming from a GridView. …

c# ado.net datatable
Getting a count of rows in a datatable that meet certain criteria

I have a datatable, dtFoo, and would like to get a count of the rows that meet a certain criteria. …

c# datatable count criteria
Simple way to copy or clone a DataRow?

I'm looking for a simple way to make a clone of a DataRow. Kind of like taking a snapshot of …

c# datatable datarow
How to get the row number from a datatable?

I am looping through every row in a datatable: foreach (DataRow row in dt.Rows) {} I would like to get …

c# datatable