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 8575795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:46:32+00:00 2026-06-11T19:46:32+00:00

I have a problem that I’m not sure how to go about solving. I

  • 0

I have a problem that I’m not sure how to go about solving. I have a C# app that receives a list of data items from server and they are bound and displayed in a datagrid. The user must then be able to alter them and add or remove items, then commit these changes back to the server. the datagrid will basically function as an “edit data” window from pgAdmin 3 or sequel server or whatever, where the user can edit the database table.

I am able to display the items in the datagrid, but not sure how to keep track of all the changes that are made to the list. When a change is made, the unchanged version of the item must be known as well as the changed version, because the original will need to be deleted and the modified version inserted.

Does anyone know how to do this?

  • 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-11T19:46:33+00:00Added an answer on June 11, 2026 at 7:46 pm

    You need to have a view-model which keeps track of the changes. Basically each item will have a current value, but also the most recent value from the DB.

    public class ViewModel
    {
        //collection of subviewmodel to bind to datagrid
    }
    
    public class SubViewModel
    {
        //Model instance
        //property to expose db value from model instance
        //field to store old db value
    }
    public class Model
    {
        //db value
        //db information
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem that on server include() function does not want to work and
I have a problem that I am not sure of the best way to
I have a problem that I have not managed to solve. I developed a
I have problem that says The specified named connection is either not found in
I have this problem that I cannot fix. From my @Controller , i can
I have a problem that I'm sure is very simple, yet I have spent
I have a problem that annoys me pretty much. I'm grabbing some content from
I have a problem that Google Map API is inheriting the style from my
I have problem that seems to be rather trivial but I was not able
I have a problem that is not uncommon when building a plug-in architecture. Assembly

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.