In .NET, DataTable is a class that represents a table of in-memory data. For the jQuery DataTables plugin, please use [jquery-datatables] tag.

learn more… | top users | synonyms (1)

3
votes
1answer
78 views

Rolling up Invoice Items Matching Certain Criteria

I have a listing of invoice line items that I need to apply some convoluted business logic to. We have another listing of items that I compare the invoice items to and if I find matches, I then need ...
6
votes
1answer
171 views

Joining datatables to create a new datatable

I am joining datatables to create a new datatable: ...
2
votes
1answer
1k views
3
votes
1answer
1k views

Using LINQ to perform a LEFT OUTER JOIN in 2 DataTables (Multiples criteria)

I know that exists a lot of solutions about how to create an OUTER JOIN between two DataTables. I created the following code in ...
6
votes
2answers
74 views

Calling functions with different variable types

I need to call the function that will get the value of a datatable cell with the ColIndex, either a text (column name) or an integer (...
10
votes
2answers
690 views

Optimize a generic foreach method that converts Datatable to my object using Reflection

I need to optimize this code block below, this method converts a Datatable object to the Object that I am passing by parameter, in another words, this serializes the object, however I have to run this ...
7
votes
2answers
1k views

WinForm Calculator

I'm looking to get this cleaned up. ...
2
votes
0answers
226 views

Grouping and summing values for food takeout

I have 4 properties which values I generate using LINQ: ...
1
vote
2answers
3k views

Convert datagridview data to DataTable

I made an algorithm to calculate when the user has to purchase material adjusting the date in which the order has to be made, I'm using datagridviews to make it work, but I was wondering if there is a ...
3
votes
2answers
5k views

Getting column values from a datatable

Is there a way I can make the code compact and with fewer ifs? ...
2
votes
2answers
903 views

Divide certain distinct row values into separate columns

This might be difficult for me to describe clearly but I will try anyway. Also note that this is entirely speculative; it might not even be able to run any faster (that is why I am asking). This is ...
6
votes
4answers
17k views

Return a list of values from a single column in a DataTable

I have this code that I was asked to maintain, it is a notification system for a third party application event system (a lot more involved than that but for the sake of this question...) The Code ...
4
votes
3answers
182 views

Classifying rows of data by the number of days to close

DataTable looks like below I would like to simplify this code in a better manner. ...
2
votes
2answers
5k views

Method for getting the DataTable when having connection ID and the SQL command

I am quite new to C# and to the ASP.NET programming. When maintaining the legacy code, I have found rather terrible implementation of the method that is used on many places to get the ...
5
votes
1answer
198 views

Optimize code block for LINQ and non LINQ

I have 2 code block to do same a work and have same target create some thing, but I don't know which block is the best (I mean LINQ or non-LINQ)? First of all, can anyone tell me how to optimize on ...
2
votes
1answer
1k views

Removing columns based on some conditions

This is a follow up to this question. I'm just removing some columns based on some condition as well using the same condition and adding the column values which I am going to remove to another ...
5
votes
2answers
5k views

Set default value for NULL in datatable

I have the following codes, which I created as extension for datatable in my project. It actually worked. Just wonder if there is any optimization can be made through. Thanks. =) ...
3
votes
1answer
93 views

Loose coupling, accessing class properties

I'm trying to get a better understanding of decoupling methods. Right now, I have this method: ...
3
votes
1answer
455 views

Populating DataGrids

I'm building an in house query tool. The main form has a drop down which allows the user to select how they want to find scripts, and a drop down for what server they want to run the query on. There ...
7
votes
3answers
378 views

Dataset with optional addition to where statement

I am trying to generate a dataset from a query that has a where statement. If the user passes a value additional things need to be added to the ...
5
votes
2answers
19k views

Better method for updating data table

I have completed an application which gathers specific records and marks them as Collected. As of now, the application runs perfectly and does exactly what I need ...
1
vote
1answer
325 views

Find abstraction for classes which represent tables with differnt amount of colums (based on DataTables)

I have a lot of classes which are principal equal, but they consist small differences so that I can´t abstract then very well. The classes represent different kinds of DataTables. Every Class has two ...
16
votes
3answers
110k views

Faster way to convert DataTable to List of Class

I am using ExcelDataReader to import an excel file to a dataset. Example Excel table below: ...
1
vote
1answer
1k views

Adding blank rows for every skipped value in a DataTable

So I have a DataTable that returns results within a month to month range when available. However, when I format the return, I need to still show skipped months as ...
1
vote
2answers
12k views

Remove matched Rows from two Datatable

Here I have two DataTables: dtTotalDateRangeExcludeSundays dtAbsentsLeavesHolidaysWorks Each has 10k+ values, and I need to delete matched rows. ...
2
votes
1answer
6k views

Performance of WPF datagrid when using DataGridTemplateColumn

I am using DataGrid to show storagehouse occupancy (Occupied-Show Image With a box, Not Occupied-Show Empty Image). In DataGrid I am using ...
1
vote
1answer
1k views

A faster implementation of AcceptChanges?

So I started wondering why it takes 3.5 seconds to AcceptChanges for one changed record in a large DataTable. I wrote another ...
4
votes
3answers
8k views

Search datatable faster

I would like to make the search faster as it takes a long time to retrieve the data that I require. Is there a faster method to do this? I have written the code below to allow me to search through a ...
3
votes
1answer
347 views

Is my base class constructed correctly?

I have tables that use BulkManager to save data to database. I moved common functionality to BulkTableBase. Because creation of ...