Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
584 views

My app allows the user to choose what table and columns to filter on. It can be a different table and columns each time the user runs this routine. So standard LINQ will not work. I need to do this ...
G Bradley MacDonald's user avatar
-1 votes
3 answers
106 views

I want to get the sum of only two columns for each data row in datable and display it in datagridView. I tried to use link query: SqlCommand cmd = new SqlCommand("SELECT * FROM Student", con)...
user3309231's user avatar
0 votes
0 answers
58 views

I'm currently working on a flow using Power Automate Desktop, and I'm encountering an issue accessing a URL from an Excel DataRow. Here's the scenario. I've successfully read data from an Excel ...
LoiShar's user avatar
  • 15
5 votes
1 answer
685 views

I am using Visual Studion 17.12.5 and I am experiencing the following problem. After upgrading the MSTest-package from 3.7.3 to 3.8.0 and Microsoft.NET.Test.Sdk from 17.12.0 to 17.13.0 the most of my ...
Joe Care's user avatar
  • 105
1 vote
1 answer
66 views

I'm Trying to set datagridview and datarow cell format when editing and after editing from datatable in vb.net. Is it possible for the Price column to still use string.empty after editing so it ...
roy's user avatar
  • 729
0 votes
1 answer
367 views

I have a DataSet in C# composed from three tables, with columns only, and I am trying to populate these tables by adding rows. This is my first table (destinationTable) The two columns that I am ...
swdev's user avatar
  • 35
1 vote
0 answers
50 views

I have relational tables like this Orders: (id, customerId(FK), productId(FK), date) Customers: (id(PK), name, surname) Products: (id(PK), name, price) in Orders table, customerId and productId have ...
ilkay kurt's user avatar
0 votes
0 answers
32 views

I am trying to convert a code from an old version of C# to a new one. Here is a minimal example: using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Example { class Program { static void ...
Yoav Avidan's user avatar
-1 votes
1 answer
401 views

I am trying to execute this select statement within my application and encounter the System.Data.EvaluateException "Cannot perform '-' operation on System.String and System.Decimal" foreach (...
Micah Stovall's user avatar
0 votes
1 answer
44 views

I have managed to get my program running as I would like it to. The issue I am running into is when I write to an XML file. I feel like I have everything set up correctly to write the contents of ...
dpresnell90's user avatar
0 votes
0 answers
347 views

I am trying to create a datatable and load a single row in to the datatable. I am using this datatable as table type parameter. But this method is enclosed in a ParallelProcessor. Some records are ...
Gladstone Jaffrey's user avatar
0 votes
1 answer
204 views

I'm looking for the easiest and fastest way to get DataRows from a DataTable. These DataRows have several columns including one with Integer and I only want the rows with the highest value. Currently ...
Kyuu's user avatar
  • 17
0 votes
1 answer
281 views

I got 8 rows with column names from stored procedure. I read this as DataTable. However, I only want three columns with reference to employeeID. This is the table I get after I run the procedure. I ...
MyatKaung's user avatar
0 votes
2 answers
125 views

I have a DataRow loaded with data from an SQL view. I then read the columns of the DataRow and assign them to an Object which properties are actually the column names of the sql view. The goal is to ...
BillSig's user avatar
3 votes
1 answer
2k views

I would be grateful for assistance with the following question. I would like to evaluate one or more data series with Xunit. For this I have programmed a simple example. Read the data series 10,20,30,...
user10's user avatar
  • 35
0 votes
1 answer
104 views

I would like to evaluate a data series and output the respective previous value. For this I use the following code: private int PrevInt(int CurrentInt) { PrevIntList.Add(CurrentInt); ...
user10's user avatar
  • 35
1 vote
1 answer
387 views

I am aware that for SqlCommand I have to use SqlParameter when passing parameters to the query, to avoid SQL injection. But what about the DataRow? For example: row.UserComment = tbUserComment.Text; ...
kovacs lorand's user avatar
0 votes
1 answer
662 views

I have a 2 DataRow that I query from the firebase database and I want to multiply the value of qty with the value in total, I have the value of 1 in a variable qty as shown here int qty = 1; in my ...
Uhsie's user avatar
  • 27
0 votes
1 answer
1k views

my DataRow object is emtpy no matter how I try to initialize it. Here is the source code: private DataTable ReadFileIntoDb(MemoryStream file) { file.Position = 0; var sr =...
J.Doe's user avatar
  • 137
0 votes
2 answers
823 views

I'm trying to find an equivalent of VB's "System.Data.DataRow.Item" but I can't find one. I'm re-writing VB code to C# and I'm new to C#. Noob question, probably. I figured you guys would ...
austin-smith-999's user avatar
0 votes
0 answers
56 views

I am iterating through a DataTable and doing some comparisons. If values match I set a flag to true. I have several cases where the it finds the match, sets the flag (I verify it right after it's set)...
Dizzy49's user avatar
  • 1,550
0 votes
1 answer
562 views

What I am trying to do is concate two string columns and use them as one. I have seen many questions and answers on that but didn't really fix my problem. I have a data table like the below which has ...
HnfGzl's user avatar
  • 3
0 votes
1 answer
6k views

I am trying to reuse some code from a project that works with DataRow instead of object. In my new project I have the model created and I work all with objects but Im trying to bring that piece of ...
Arxeus's user avatar
  • 82
0 votes
1 answer
56 views

I haven a question: How can i hide some tabledata if a checkbox is checked? I tried a few similar solutions on this web but couldn't find the right solution. This is the HTML of the checkbox: ...
Wiljan's user avatar
  • 45
0 votes
0 answers
525 views

I have a bit of code that I'm stuck on. I am trying to search the ReasonCodeTable for some values in the DataRow from R64CodeTable so that I can update it. Find(_rcdr["Reason Code"]) Works ...
Dizzy49's user avatar
  • 1,550
0 votes
0 answers
244 views

I am updating a DataTable, and when I do it says Table doesn't have a primary key. I changed how I created the table, and added a PrimaryKey, so what's going on? I create the table, add columns, and ...
Dizzy49's user avatar
  • 1,550
0 votes
0 answers
279 views

Hy there. I have a problem when copying a row from a datatable to another one. I know the question was make from a lot of people and there's a lot of solution, but i didn't found any that work for me ...
Andrea_86's user avatar
  • 539
0 votes
1 answer
2k views

I have two exactly same DataTables ("Old" and "New") and I want to compare rows with same identifier. For example both datatables (dt1 , dt2) have "ID" column and so I ...
JmukhadzeT's user avatar
-1 votes
2 answers
1k views

Can't figure out why this won't work. I get the same "Specified Cast is Invalid" error message. New to C#, be kind. It fails at the if(!((int)WrkRow["ManualWeight"] == 1 | etc. ...
CircleDot's user avatar
4 votes
2 answers
1k views

I'm trying to print the content of a DataTable, starting with the column headers, followed by the content of the table tupples. output.Add($"Table : [{dataTable.TableName}]"); string ...
Dominique's user avatar
  • 17.7k
1 vote
1 answer
1k views

Update: to explain what type of Datatables I Am comparing- "Compare two Datatables with the same columns, one Datatable is being pulled form an external server and inserted Initially, from then ...
Asim Ramay's user avatar
0 votes
1 answer
457 views

I have a Janus Grid with a checkbox in each row and wanna copy selected row(s) to a DataRowCollection or to DataRow[] .this is my way but not completed and not worked: also this grid has group on one ...
MHD's user avatar
  • 47
1 vote
3 answers
470 views

We are implementing IEnumerator and IEnumerable in our class static void Main(string[] args) { ParsingFile data = new ParsingFile(); foreach (var line in data) // ...
raju's user avatar
  • 25
-1 votes
1 answer
82 views

So say I have a two word name in a DataRow with a space in between words. The entire name is represented as "poc" in the datarow. I can get the poc to display the full name no problem. The ...
JonMarsh89's user avatar
0 votes
1 answer
325 views

My dataset has column ' START_DATE' and its in datetime format. this is what i tried so far. foreach (DataRow dR in codeDs.Tables[0].Rows) { var def_startDate = Convert.ToDateTime(dR["...
Wymo Oo's user avatar
  • 65
0 votes
1 answer
455 views

In my code I want that the user can add a new DataCell to a DataRow in my DataTable. But I dont know how I can add a single DataCell. My Code looks like this, but it didnt work: List<DataRow> ...
Dalon's user avatar
  • 720
0 votes
1 answer
2k views

I want to call a web api method on page load event of my project. But I want to wait for the execution of the function 'GetSelectedTaskDetails' to complete. So that I can manage with the values from ...
user2431727's user avatar
-1 votes
2 answers
894 views

So I have a DataTable that I bind to the DataGrid in XAML. User is allowed to add, modify and remove rows for a table. I would like to mark rows with a specific colour, depending on the action that ...
vic's user avatar
  • 9
1 vote
1 answer
439 views

i have a DataTable, where i want to add Rows. The Code works, but the Data Row gets add below the last Data Row. I want to add a Row at the top. I used list.insert(0, element) but it didnt work. This ...
Dalon's user avatar
  • 720
1 vote
1 answer
2k views

I have migrated legacy code from vb to c#. The following migrated line of code raises an error: using System.Data; .. .. DataRow targetDataRow = targetDataTable.NewRow(); targetDataRow.SetField("...
Adham Enaya's user avatar
0 votes
0 answers
156 views

I'm trying to match a string inside a DataRow that holds a string array. I was able to achieve that once the column type was only string, but now it's a string array per row. The DataTable is a ...
h3ferd's user avatar
  • 53
-1 votes
1 answer
866 views

I'm currently using an existing piece of code that can insert all data rows from a specified data table column into a list as integers. However, in the current code I can only add all data rows. I ...
James VH's user avatar
0 votes
2 answers
656 views

I know this is a classic error but I'm not aware of what is happening. I have a DataSet and then I evaluate if it is filled before moving on, like this: if ( ds == null ...
user729400's user avatar
0 votes
1 answer
85 views

I'm in the process of converting VB to C#.Net for my company. In order to do this more easily, I have option strict ON. I am trying to resolve a late binding on the following code. Row is considered ...
user2670663's user avatar
0 votes
1 answer
413 views

I have a dataset in c# visual studio. I have one of column values of the one of the rows. I need to select that row using that value and store it in a datarow so that I can delete it. So how can I get ...
Govind Sankar M R's user avatar
1 vote
1 answer
4k views

I have a DataTable (dt) with multiple columns which is the source to DataGridView. I am trying to filter this DataTable(dt) with a list of values of a particular column. I need to filter the Below ...
abdul kareem's user avatar
0 votes
0 answers
901 views

I have a gridcontrol which needs to be populated with some data. I have created a datatable and populated data in datarow and added to the table. Data is present in table on analysis. Datatable is ...
user14805556's user avatar
1 vote
1 answer
2k views

I have a lot of model classes that I fill in with data from API. Structure of API data is DataRow. For each class there is an implicit conversion from DataRow to model class. I have to write a set of ...
Milos's user avatar
  • 143
-4 votes
1 answer
685 views

I am binding a selected row to a new data row which needs to be added to a database. I am using the dt.Importrow(newRow) to add the new datarow to the data table. However, if I make changes to this ...
Fault Spot's user avatar
0 votes
1 answer
939 views

Why does the following code at random times write null values ​​to the DataRow object? ConcurrentDictionary<long, DataRow> dRowDict = new ConcurrentDictionary<long, DataRow>(); foreach (...
pl.lepko's user avatar

1
2 3 4 5
16