Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6325735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:57:09+00:00 2026-05-24T16:57:09+00:00

I am trying to explain what I need to do. As you can see

  • 0

I am trying to explain what I need to do.

As you can see in the second foreach, I am iterating over the temporary data table, but I need to set a value for the same row in the original data tablerow.
For example:
_uc090_WingsIntegrationDataSet.WingsBookingInterface[0][“property”] = x;

What I dont know how to implement is how to find that row and set the property, I saw the LoadRow method but I never used it before.

            DataTable tempTable = _uc090_WingsIntegrationDataSet.WingsBookingInterface.Clone();

            DataRow[] datarows = _uc090_WingsIntegrationDataSet.WingsBookingInterface.Select("REFMDossierID = " + refmDossierId);

            if (datarows.Length > 0)
            {
                foreach (DataRow dr in datarows)
                {
                    tempTable.ImportRow(dr);
                }
            }


           //2.     foreach master row
            foreach (UC090_WingsIntegrationDataSet.WingsBookingInterfaceRow row in tempTable.Rows)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:57:09+00:00Added an answer on May 24, 2026 at 4:57 pm

    You can find the row using Rows.Find(), but it requires that a PrimaryKey be set on at least one column in your DataTable.

    As far as loading new data, you can use LoadDataRow() which will update existing rows (if a primary key is supplied) or insert new data if any matching datatypes are found.

    Please take a look at the following example using untyped datasets:

    DataSet dataSet = new DataSet("MyDataSet");
    DataTable dataTable = dataSet.Tables.Add("JavaScriptLibraries");
    
    DataColumn[] dataColumns =
        new[] {
            new DataColumn("Id", typeof(Int32))
                {
                    AutoIncrement = true, 
                    AllowDBNull = false, 
                    AutoIncrementSeed = 1
                }, 
            new DataColumn("Name", typeof(String))
        };
    dataTable.Columns.AddRange(dataColumns);
    dataTable.PrimaryKey = new[] { dataTable.Columns["Id"] };
    
    DataRow dataRow1 = dataTable.NewRow();
    dataRow1["Name"] = "jQuery";
    dataTable.Rows.Add(dataRow1);
    
    DataRow dataRow2 = dataTable.NewRow();
    dataRow2["Name"] = "MooTools";
    dataTable.Rows.Add(dataRow2);
    
    // Copy the dataset
    DataSet tempDataSet = dataSet.Clone();
    DataTable tempDataTable = tempDataSet.Tables["JavaScriptLibraries"];
    DataRow[] tempRows = dataSet.Tables["JavaScriptLibraries"].Select("Name = 'jQuery'");
    
    // Import rows to copy of table
    foreach (var tempRow in tempRows)
    {
        tempDataTable.ImportRow(tempRow);
    }
    
    foreach (DataRow tempRow in tempDataTable.Rows)
    {
        // Find existing row by PK, then update it
        DataRow originalRow = dataTable.Rows.Find(tempRow["Id"]);
        originalRow["Name"] = "Updated Name";
    }
    
    // Load new data using LoadDataRow()
    object[] newRow = new[] { null, "New Row" };
    dataTable.BeginLoadData();
    dataTable.LoadDataRow(newRow, true);
    dataTable.EndLoadData();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope this I can explain what I am trying to achieve: I want
Can anyone explain this to me. I'm trying to inject a CSS file onto
May be I can't explain exactly in words what I am trying to achieve,
As you can see in the title, I'm trying to not use runOnUiThread each
I am trying to check to see if a player can no longer make
I am trying to explain to myself the forecasting result from applying an ARIMA
I have another programmer who I'm trying to explain why it is that a
I have legitimate reasons to do what I am trying to explain. I have
First I will explain what I am trying to do. I am trying to
Let me first explain what's I'm trying to do. So I have a entity

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.