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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:09:41+00:00 2026-05-16T12:09:41+00:00

I have binded a list with Editable WPF DataGrid I want to get only

  • 0

I have binded a list with Editable WPF DataGrid

I want to get only the modified Items from the WPF Data Grid for updation.

Please let me 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-05-16T12:09:42+00:00Added an answer on May 16, 2026 at 12:09 pm

    I have my WPF datagrid app set up as so:

    1) Manually defined all the columns, set their bindings and for each binding specified that it notifies on source updates

    2) Added an event handler for the datagrid’s SourceUpdated event

    3) In the event handler I have only the following code:

    this.updatedItems.Add(BindingOperations.GetBindingExpression(e.TargetObject, e.Property).DataItem as MyClass); 
    

    updatedItems is a HashSet<> and MyClass is the type of objects bound to the datagrid’s ItemsSouce.

    4) When the user clicks on the save button I simply enumerate the hashset. Hashset is nice, because it only contains unique values. So if a row is edited multiple times or even if multiple cells in the same row are edited, the hashset will still only contain a single entry for the object.

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

Sidebar

Related Questions

I have a WPF Datagrid binded with list of interface objects. Consider, ClsEmployee class
I have a ComboBox which is binded with a List. Consider I have 10
I have a DataGridView binded to this table: [Users] ID Name -- ---- 11
I have created 2 dropdownlists that are binded to a SQL DB and then
I have a listview that is binded to a ThreadSafeObservableCollection. The background of each
The problem I have a list of tasks with which a user is greeted
I have a textbox in my view that i want to receive the value
I have a sectioned UITableView using dictionaries adapting code from a tutorial (I don't
Have just started using Google Chrome , and noticed in parts of our site,
Have you ever seen any of there error messages? -- SQL Server 2000 Could

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.