Questions tagged [datacolumncollection]

9 questions
84
votes
3 answers

Querying DataColumnCollection with LINQ

I'm trying to perform a simple LINQ query on the Columns property of a DataTable: from c in myDataTable.Columns.AsQueryable() select c.ColumnName However, what I get is this: Could not find an implementation of the query pattern for source…
David Brown
  • 35,411
  • 11
  • 83
  • 132
1
vote
4 answers

How to remove DataColumn from DataTable programmatically

I have a code foreach (DataColumn dataTableCol in this.dataTable.Columns) { bool columnFound = false; foreach (GRTColumnView uiColumn in descriptor.UIColumns) { if…
SimpleGuy
  • 2,764
  • 5
  • 28
  • 45
0
votes
0 answers

read json data from text file according to my conditions

here is my jason text file containing more than two json object having different policyNumber i want to read data on the base of policyNumber or may be another value and it show only those json object having same parameters that i request or say…
SATYAM
  • 1
0
votes
3 answers

Accessing the List-Property of a DataColumnCollection of a DataTable

I am trying to access the List-Property of the DataColumnCollection of a DataTable, and it seems like there is none. The access is necessary, for there is a collection of strings ("Format") that I need to process after the extraction from the…
Nepomuk
  • 21
  • 4
0
votes
1 answer

What type of columns would be created executing this code?

I have created a function that reads a Tab Delimited text file and create a data table as per it's header arrangement. below is my code: Private Function MakeDataTable(ByRef XSplitLine) As DataTable Dim AMZTable As New DataTable Dim i = 0 …
J.Doe
  • 31
  • 1
  • 8
0
votes
1 answer

Updating database after changing DataColumnCollection in DataTable

I need to update database after adding/changing column in DataColumnCollection in DataTable. How can I do this? I used this code to add new column: dataTable.Columns.Add("newColumn", typeof (int)); This code works for changed rows in dataTable, but…
Pyro2266
  • 310
  • 2
  • 5
  • 18
0
votes
0 answers

Column 'IC NUMBER' does not belong to table in winform

I'm trying to access a data column in a datatable to get its value but i keep getting the same error that the IC NUMBER column does not belong to this table! on this line ic[j] = Form1.dt.Rows[i]["IC NUMBER"].ToString(); when i debug the…
CodeMonkey
  • 2,511
  • 4
  • 27
  • 38
0
votes
1 answer

How do I Pull a Single Column of Data out of a Filled DataSet?

How do I pull a single column of data out of a filled dataset? I have a filled dataset object, with a variety of tables. I need to get all of the data that is stored in a particular column in one of the tables, and bind a ComboBox ItemSource to…
Giffyguy
  • 20,378
  • 34
  • 97
  • 168
-3
votes
3 answers

import text file to process specific columns

I am new to python use. But learn by practice to use in my data processing. I have a big data file in the format as shown here. Always unknown number of rows and columns. In this example there are 2 consecutive rows shown. The 1st column is "time"…
Gouri
  • 17
  • 1
  • 5