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

  • Home
  • SEARCH
  • 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 8791303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:49:26+00:00 2026-06-13T22:49:26+00:00

I have a grid and dataset object connected with it. And datalayer working with

  • 0

I have a grid and dataset object connected with it.
And datalayer working with LINQ. So I need to delete elements that was deleted in grid from LINQ data source.

I have a method that convert my DataRow item to LINQ item. For example:

DataRow forDelete = ...;
LinqItem itemForDelete = ConvertFromDataRow(forDelete);
dataContext.DeleteOnSubmit(itemForDelete);

this code throw an exception, that imposible to delete item who is not attached to table.
But if I change it to

DataRow forDelete = ...;
LinqItem itemForDelete = ConvertFromDataRow(forDelete);
dataContext.Attach(itemForDelete)
dataContext.DeleteOnSubmit(itemForDelete);

than it will throw exception that it’s impossible to attach item, which already exist.

Question will be how to attach an item properly in that case. That should solve the problem.

  • 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-06-13T22:49:26+00:00Added an answer on June 13, 2026 at 10:49 pm

    Looks like there are no correct answer on that question or no way to do what I need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a grid view that is data bound to a dataset. In a
I have a grid that is binded to a dataset that is populated from
I have a DataGridView, which loads data from mdb Access table The grid only
I had a grid view populated from dataset and I have to redirect another
i have data-grid in my application and i want to customize my data-grid so
I have a problem with binding data using BindingSource, typed dataset and DataGridView. My
I am new in asp.net and working on the data grid view in asp.net.i
I have a winforms app that uses a strongly typed custom DataSet for holding
Let's say I have an object that is fairly complex. Since it is so
I have a gridview that I want to read, delete, edit and update, I

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.