DataRow is an ADO.Net class that represents a row of a data in a DataTable.
Questions tagged [datarow]
755 questions
0
votes
4 answers
how to set datarow to String array?
I have a datatable on which I am applying Select() method. After that I want to get the result into an array of String. I have tried the following code but it is not working.
Please let me know the exact solutions for this.
DataTable dtget =…

Ram
- 1,131
- 10
- 28
- 52
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
3 answers
C# - Getting record from a row using DataRow
I'm trying to get record of a row using DataRow. Here's what I've done so far:
uID = int.Parse(Request.QueryString["id"]);
PhotoDataSetTableAdapters.MembersTableAdapter mem = new PhotoDataSetTableAdapters.MembersTableAdapter();
…

huong
- 4,534
- 6
- 33
- 54
0
votes
1 answer
Search DataRow with Linq and delete from Dataset
I want to delete a DataRow in my MySql database, using Linq to search the row, and delete the row from the dataSet.
But it wouldn't work to delete the row in my database.
My code:
var results = (from myRow in…

francisMi
- 925
- 3
- 15
- 31
0
votes
2 answers
Catch DataRowChanged Event in Dictionary>
How can I catch DataRowChanged event for each DataTable in Dictionary>?

Saint
- 5,397
- 22
- 63
- 107
0
votes
4 answers
Convert datarow(only single column) to a string list
Please look at what is wrong? I want to convert datarow to a string list.
public List GetEmailList()
{
// get DataTable dt from somewhere.
List drlist = dt.AsEnumerable().ToList();
List sEmail =…
user1108948
0
votes
1 answer
DataRow Delete without firing CurrentChanged Event
Well, I have the following problem:
I need to delete a row from a bindingsource without fireing the CurrentChanged event. Deletion is working without any problems. But it raises the CurrentChanged event instantly, which leads to my code matching to…

reijin
- 121
- 3
- 9
0
votes
1 answer
Adding a datarow by dynamically reading a text file
I have a program that reads a text file and creates a datatable dynamically based on the columns in the file.
This seems to work fine.
I then try to read the rest of the text file, creating a data row to add to my table. I'm using the code below…

misricko
- 13
- 2
- 4
0
votes
1 answer
DataSet Row Add / Imports Nothing
So I have a function when fired queries against the database (twice) and returns the results in a dataset. It checks the results (to make sure there are some) then loops through and grabs each row from the returned dataset and imports (copies) it to…
user856197
0
votes
1 answer
remove datarow in datatable through listview control
i have a problem in delete datarow from the datatable using a button in listview. I am trying to use the button that is selected to delete the row.
protected void ShoppingCart_SelectedIndexChanged(object sender, EventArgs e)
{
String title =…

eugene
- 638
- 2
- 9
- 19
0
votes
2 answers
C# syntax issue - trying to add value to data row
I am trying to code a sort routine against a dynamicaly populated gridview names Users. I have a syntax error in the C# code where I am trying to populate a column in a row of a the datatable.
for (int j = 0; j <= Users.Rows.Count - 1; j++)
…

htm11h
- 1,739
- 8
- 47
- 104
0
votes
1 answer
ClassCastException org.jdesktop.DataSet.DataRow to TypedDataRow
I have this typed DataRow:
import org.jdesktop.dataset.DataRow;
public class MainDataRow extends DataRow {
private MainDataTable baseDataTable;
protected MainDataRow(MainDataTable dt) {
super(dt);
this.baseDataTable = dt;
}
public…

Miquel
- 8,339
- 11
- 59
- 82
0
votes
2 answers
Adding a datarow from an existing table to a new table
Hi i want to add a datarow that im getting back from a data table to a new datatable
this is the code im using:
foreach (DataRow dr1 in dt.Rows)
{
string AptType = dr1["AppointmentType"].ToString();
if (AptType == "FreeTime")
{
…

kevinw
- 103
- 1
- 2
- 12
0
votes
1 answer
datarow filter value to datatable
I want to insert data row filter value to datatable but it returns the following error "This row already belongs to another table." Please help me to fix this error..
This is my partial code :
for (int j = 0; j < ListBox1.Items.Count; j++)
…

FDO
- 45
- 1
- 10