Questions tagged [datacolumn]
212 questions
0
votes
1 answer
Datagridview.DataPropertyName = System.Data.DataColumn.?
I have a list of columns
Dim ListCol As List(Of System.Data.DataColumn)
For Each Col As System.Data.DataColumn In Grid.Columns
ListCol.Add(Col)
Next
I need the user friendly name of the columnl not the…

Ccorock
- 892
- 12
- 37
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
0
votes
1 answer
Can i store serializable array data in DataColumn?
I am trying to automatically convert object's properties to DataTable (object is array and has properties that instantiated from special class which has value type).
The code:
static public DataTable f_GetDataTableFromClassObject(object…

uzay95
- 16,052
- 31
- 116
- 182
0
votes
1 answer
How can I access what a previous variable was set to?
I have a foreach nested inside a foreach. I need to check whether d is less than all the other d's. How can I do this? If there is a way to see what a variable was previously set to, then I would be able to do this myself. If not, could you please…

Adam Andre
- 13
- 1
- 6
0
votes
3 answers
How do you take two datatables and match values, then add something to a column in the matched row values?
I have two datatables and I need to match zipcodes from each of the datatables, and every time the program finds a match, I need to set a column in the matched rows to a string.
Here is my code.
I do not know what to do in the foreach loop, or if…

Adam Andre
- 13
- 1
- 6
0
votes
1 answer
How to retrieve column values separately through sql data adapter class?
I am trying to learn how to use sql data adapter ... I have coded the following to check how it works ...
the problem is i want to retrieve values of 3 columns(DeptNo,DeptId,DeptName) of my database table "Sana" separately and display them in three…

Sana.91
- 1,999
- 4
- 33
- 52
0
votes
1 answer
DataColumn Expression Divide By Zero
I'm using basic .net DataColumns and the associated Expression property.
I have an application which lets users define which columns to select from a database table. They can also add other columns which perform expressions on the data columns…

Lee
- 126
- 8
0
votes
2 answers
How are database datatypes returned in DataColumn class?
I have searched and found surprisingly few results. I found that there is some datatype property for DataColums, but when retrieving data from a SQL server database, what is the datatype of whatever is retrieved? I'm working with a SqlDataAdapter to…

MarioDS
- 12,895
- 15
- 65
- 121
0
votes
1 answer
Add autoincrement to an already populated DT--Updating the values
I have a DataTable I'm reading from a csv file. I need to add an ID AUTOINCREMENT column to the DT AFTER it's read from the file (I'm using a CSV parser so I don't have to readLine, i.e. the data is loaded to the DT for me)
I'm adding the DataColumn…

llappall
- 2,852
- 3
- 23
- 26
0
votes
2 answers
How to access an column with special characters using DataTable.Select()?
I have a DataTable with column such as # of Students and would like to sort by this in descending order. Here is my code:
...
dt.Columns.Add(new DataColumn("# of Students", typeof(string)));
// do some stuff... add records etc.
// A runtime error…

aarona
- 35,986
- 41
- 138
- 186
0
votes
2 answers
How to merge two column which are already exist in one datatable?
I have one datatable. In that table I have columns named [Total Day], [Present day], and [leave].
Data are as follows:
[Total Day], [Present day], [leave]
30 25 5
30 26 4
Now i want to concatenate…

AB Vyas
- 2,349
- 6
- 26
- 43
-2
votes
2 answers
How to Remove quotation mark with object data type from a column in Python and convert to float
Customer id ----- object
ValueError: could not convert string to float: "'5769842393258'"
df["Customer id"] = df["Customer id"] .replace('"', '', regex=True)
df["Customer id"] = np.array(df["Customer id"],dtype=float)

SEIKO5
- 1
- 1
-2
votes
1 answer
Adding multiple columns to DataTable quickly using vb.net
Here is what I'm currently using. It works fine, but takes several seconds to complete. Is there a faster way? I've tried creating a list of DataColumn and using table.columns.addRange(list.toArray) with no improvement. I just need the columns…

Matt
- 11
- 1
- 1
-2
votes
1 answer
Selecting a column from datatable to check its values
I have a datatable which has 3 columns "Name","Type","ID" i want to use only one column in it for comparison. Which is "Type". I wanted to take that column put it in a DataColumn separated from the datatable, compare the values of the cells in it…

KamalF
- 105
- 1
- 3
- 19
-2
votes
3 answers
Replace content in a DataSet
Google-translate:
I would go a dataSet (below "dat") so that every time a chain of unwanted character is found, it is replaced.
Currently, I get stuck on the first line ... (see the MessageBox) (Sorry if my code is clean ^ ^ ')
Can you tell me…

J.P.A
- 95
- 6