DataRow is an ADO.Net class that represents a row of a data in a DataTable.
Questions tagged [datarow]
755 questions
-1
votes
1 answer
initialize a class from datarow
I'm trying to initialize a class using a DataRow, But when the DataRow item "LOCATION" is a Null value I receive an error. How can I load these variables with their appropriate datatype values when the row item is null?
Public Sub New(ByVal row…

lilbrettbro
- 1
- 1
-1
votes
2 answers
datarow variable assign to dataset's table newrow
I'm trying to define a datarow to hold values and then add it to data set
indgv: datagridview with values in it
dsdetails: a dataset with a table named details
If indgv.Rows.Count > 0 Then
Dim dr As DataRow
dr =…

uramium
- 17
- 1
- 5
-1
votes
1 answer
foreach through a dataTable
Can someone show me how to loop through a datatable for a value of 'true' and if that value is true set it to a string? I am not sure how to write it and I started to write a foreach. Can someome show me how to finsh it with their own…

user2292217
- 213
- 2
- 4
- 11
-1
votes
1 answer
Determine if Rows if returned
I have a function that returns a single data row from a data table based on a certain value in a certain column. what if the value doesnt produce a row, how can i determine that by using the empty row?
ie, if i had a query that returned a table…

dwarf
- 445
- 2
- 9
- 23
-1
votes
3 answers
How To Add More Then One Value In Data Row C#?
i am trying to show more then one value in datarow i tried it with different ways but getting error my code is,
crow["BaseCostHighWay * POF * PTF * WCF"] = BaseCostScoreHW + POF + PTF + WCF;
i trying to show "BaseCostScoreHW " "POF" "PTF" "WCF" in…

tester Joe
- 73
- 2
- 5
- 15
-1
votes
1 answer
same variable being passed to multiple threads
hi please check this code
For icnt As Integer = 1 To 100
Me.SetText(icnt)
Dim gd As String = ""
Dim gl As String = ""
Dim cr As String = ""
Dim lr As String = ""
Dim tbs As String = ""
Dim srt…

xhammer
- 145
- 2
- 12
-2
votes
1 answer
Remove Data Row with value less than other row
I have a Data Table with multiple row with the same "IPC" values but different "Security" values.
For every "IPC" I'm interested at the rows that have the highest Mkt Value and delete the others.
Here an example:enter image description here
How can…

Stefano Brunato
- 29
- 6
-2
votes
1 answer
'row' argument cannot be null.Parameter name: row
I am trying to load back values from a CSV to my class. Then display the values to my datatable. However, I get the error even after my values have been loaded into the class and placed inside the intended columns (See Figure 1). The error occurred…

masyita shariff
- 110
- 1
- 8
-2
votes
1 answer
Why does the debugger endlessly loop over cascading "Static Members" and "Value" properties?
When I was debugging the data returned from a Stored Proc, I drilled into the DataRow to see what values were assigned the various members of the data set. This took me down a rabbit hole on a wild goose chase, going from "Static Members" to "Value"…

B. Clay Shannon-B. Crow Raven
- 8,547
- 144
- 472
- 862
-2
votes
1 answer
cannot convert from object to string in C#
I am not sure how to deal with this error I am getting:
"cannot convert from object to string"
row["timeinseconds"] = TimeSpan.FromSeconds( double.Parse( r["timeinseconds"] ) ).ToString(@"hh\:mm\:ss");
The timeinseconds is coming from a sqlite…

Ben
- 2,122
- 2
- 28
- 48
-2
votes
2 answers
No overload for method '(method)' takes 1 argument
I have this quote, and it keeps showing me error:
no overload for method `getDistinctRegister5' takes 1 argument.
private int getDistinctRegister5(string module, string sij)
{
string dateFrom = TbDateFrom.Text.Trim();
string…

Claudia Peh
- 27
- 2
- 4
-2
votes
3 answers
NullReferenceException on DataRow C#
My problem is about an object not set to an instance after the first line inside the foreach loop. I really had a hard time thinking what should be instantiated here. So please guys, i just want to map the data from the DataTable to the a new List.…

vonndutch
- 43
- 1
- 2
- 7
-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
-2
votes
2 answers
how to give color to datarow?
I have created a datarow before binding the gridview.
this is my code :
DataTable dt1 = objAttendees.fetch_attendeesforSupplier();
if (dt1.Rows.Count > 0)
{
DataRow dr = dt1.NewRow();
//DataRow dr = style.'background: #EEE9F8;';
…

Sambasiva
- 1,034
- 3
- 16
- 29
-2
votes
1 answer
Solve the datarow code?
Below code raise error
DataRow[] dr = dt.Select("" + ColumnName + "='" + strLetter + "'" + " order by asc");
error is
Missing operand after 'order' operator.

RAMARAJ.M
- 129
- 15